From 13c85aa3614ace6aff2e1614a4ca9da5fab33b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?=
Date: Mon, 19 Oct 2020 23:37:19 +0200 Subject: [PATCH] degesch: comment about improving word wrapper --- degesch.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/degesch.c b/degesch.c index 7063343..ac9cd8a 100644 --- a/degesch.c +++ b/degesch.c @@ -3419,6 +3419,14 @@ struct line_char_attrs int bg; ///< Background colour (-1 for default) }; +// We can get rid of the linked list and do this in one allocation (use strlen() +// for the upper bound)--since we only prepend and/or replace characters, add +// a member to specify the prepended character and how many times to repeat it. +// Tabs may nullify the wide character but it's not necessary. +// +// This would be slighly more optimal but it would also set the algorithm in +// stone and complicate flushing. + struct line_char { LIST_HEADER (struct line_char)