aboutsummaryrefslogtreecommitdiff
path: root/vt.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-01 10:23:38 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-01 10:23:38 +0000
commitd70956da08c987af639fd8e03e669ca59c4c542b (patch)
tree45010a108850fc3e40970b2b4a8f5faeaf180f07 /vt.c
parentvt: only prep logging of CSI/ESC parameters when debug logging is enabled (diff)
wip: use a sliding window instead of memmove() to scroll
Instead of memmoving a large amount of data on every scroll, use a sliding window. That is, each time we scroll, we offset origin.
Diffstat (limited to 'vt.c')
-rw-r--r--vt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/vt.c b/vt.c
index c7e75a94..f52b6d0f 100644
--- a/vt.c
+++ b/vt.c
@@ -678,7 +678,11 @@ action(struct terminal *term, enum action action, uint8_t c)
term_cursor_to(term, term->cursor.row + 1, 0);
}
- struct cell *cell = &term->grid->cells[term->cursor.linear];
+ size_t cell_count = 1;
+ struct cell *cell = grid_get_range(
+ term->grid, term->cursor.linear, &cell_count);
+ assert(cell_count == 1);
+
term_damage_update(term, term->cursor.linear, 1);
if (term->vt.utf8.idx > 0) {