Commit: 9259573432ade2a81bafc3a538ca1e0989576866
Parent: 0b42f34f01f856160187761fa4af6ca3b76b6fb4
Author: Randy Palamar
Date: Mon, 2 Sep 2024 15:42:12 -0600
don't fill the linebuf with 0 length lines
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/terminal.c b/terminal.c
@@ -1053,8 +1053,10 @@ split_raw_input_to_lines(Term *t, s8 raw)
t->unprocessed_bytes = old.len;
return parsed_lines;
case EMC_CURSOR_MOVED:
- parsed_lines++;
- feed_line(&tv->lines, old.data, t->cursor.style);
+ if (line_length(tv->lines.buf + tv->lines.widx)) {
+ parsed_lines++;
+ feed_line(&tv->lines, old.data, t->cursor.style);
+ }
break;
case EMC_SWAPPED_SCREEN:
parsed_lines++;