mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-10 04:27:45 -05:00
render: regression: don't apply scroll damage when view is in scrollback
When user has scrolled back in the output history, new output should not trigger scrolling. This was true for normal cell rendering, which renders the cells *in view*, not caring where the "front" of the output is. However, we still applied scroll damage. I.e. we memmoved part of the screen. The fix is simple; only apply scroll damage when the view is at the front of the output.
This commit is contained in:
parent
293adbb295
commit
89cec15920
1 changed files with 17 additions and 14 deletions
31
render.c
31
render.c
|
|
@ -528,22 +528,25 @@ grid_render(struct terminal *term)
|
|||
* by the cursor, since only the final cell matters. */
|
||||
all_clean = false;
|
||||
}
|
||||
}
|
||||
|
||||
tll_foreach(term->grid->scroll_damage, it) {
|
||||
switch (it->item.type) {
|
||||
case DAMAGE_SCROLL:
|
||||
grid_render_scroll(term, buf, &it->item);
|
||||
break;
|
||||
|
||||
case DAMAGE_SCROLL_REVERSE:
|
||||
grid_render_scroll_reverse(term, buf, &it->item);
|
||||
break;
|
||||
}
|
||||
|
||||
tll_remove(term->grid->scroll_damage, it);
|
||||
}
|
||||
|
||||
if (term->grid->view == term->grid->offset) {
|
||||
tll_foreach(term->grid->scroll_damage, it) {
|
||||
switch (it->item.type) {
|
||||
case DAMAGE_SCROLL:
|
||||
grid_render_scroll(term, buf, &it->item);
|
||||
break;
|
||||
|
||||
case DAMAGE_SCROLL_REVERSE:
|
||||
grid_render_scroll_reverse(term, buf, &it->item);
|
||||
break;
|
||||
}
|
||||
|
||||
tll_remove(term->grid->scroll_damage, it);
|
||||
}
|
||||
} else
|
||||
tll_free(term->grid->scroll_damage);
|
||||
|
||||
if (term->render.workers.count > 0) {
|
||||
|
||||
term->render.workers.buf = buf;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue