scrollback: regression: fix rendering of scrollback diffs less than a screen

When doing "small" scrolls (typically done via mouse wheel or
similar), we render the scrolling by emitting a "scroll damage".

A recent commit changed how scroll damage is rendered; only when the
view is at the bottom ("following" the screen output) do we render the
damage.

To fix this, add a new type of scroll damage,
SCROLL_DAMAGE_IN_VIEW and SCROLL_DAMAGE_REVERSE_IN_VIEW.

These signal to the renderer that it should always render the damage.
This commit is contained in:
Daniel Eklöf 2019-10-29 21:09:37 +01:00
parent 89cec15920
commit a42df2434b
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 23 additions and 14 deletions

View file

@ -129,7 +129,9 @@ struct coord {
int row;
};
enum damage_type {DAMAGE_SCROLL, DAMAGE_SCROLL_REVERSE};
enum damage_type {DAMAGE_SCROLL, DAMAGE_SCROLL_REVERSE,
DAMAGE_SCROLL_IN_VIEW, DAMAGE_SCROLL_REVERSE_IN_VIEW};
struct damage {
enum damage_type type;
/* DAMAGE_SCROLL, DAMAGE_SCROLL_REVERSE */