From f4b036ef0990eda62e284f69db9fc58f4ffefa3b Mon Sep 17 00:00:00 2001 From: Ben Wiley Sittler Date: Sun, 2 Nov 2008 21:57:21 +0000 Subject: [PATCH] optimization: when the canvas is only a single line, we can always optimize by merging cells --- caca/codec/export.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caca/codec/export.c b/caca/codec/export.c index aaa3096..f525c31 100644 --- a/caca/codec/export.c +++ b/caca/codec/export.c @@ -526,7 +526,7 @@ static void *export_html3(caca_canvas_t const *cv, size_t *bytes) /* Use colspan option to factor cells with same attributes * (see below) */ len = 1; - while((y || ! has_multi_cell_row) + while((y || (! has_multi_cell_row) || (cv->height == 1)) && (x + len < cv->width) &&