From a42df2434b796f19ff729e194dd6a22f5128b89a Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 29 Oct 2019 21:09:37 +0100 Subject: 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. --- terminal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index 6f6e1d53..2a014d90 100644 --- a/terminal.h +++ b/terminal.h @@ -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 */ -- cgit v1.3