aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--degesch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/degesch.c b/degesch.c
index 912a489..7b8494f 100644
--- a/degesch.c
+++ b/degesch.c
@@ -3063,6 +3063,14 @@ buffer_line_flush (struct buffer_line *line, struct formatter *f, FILE *output,
for (struct formatter_item *iter = line->items; iter->type; iter++)
formatter_add_item (f, *iter);
+ // XXX: we could reset attributes _before_ the newline. That, however,
+ // doesn't really work, because when the line wraps at the end of the
+ // screen and a background colour is set, the terminal paints the entire
+ // new line with that colour. "clr_to_eol" is not a solution in that
+ // case either, because it may delete the last character on a non-wrapped
+ // line, and while we can append an extra space as a workaround, that can
+ // cause an extra wrap for which I've found no way of avoiding.
+ // TODO: think about manual line wrapping; that way we can also word wrap
formatter_add (f, "\n");
formatter_flush (f, output, raw_attributes);
formatter_free (f);