mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-01 07:15:32 -04:00
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.
This commit is contained in:
parent
9e3b8ab3ff
commit
d70956da08
7 changed files with 140 additions and 108 deletions
6
vt.c
6
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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue