vt: implement reverse scrolling (terminfo 'ri')

This currently duplicates the code paths for DAMAGE_SCROLL; there are
many similarities between the two, but also major differences...
This commit is contained in:
Daniel Eklöf 2019-06-23 17:16:52 +02:00
parent c0a9f9e6b2
commit fbf0db621c
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 132 additions and 28 deletions

View file

@ -28,7 +28,7 @@ struct cell {
struct attributes attrs;
};
enum damage_type {DAMAGE_UPDATE, DAMAGE_ERASE, DAMAGE_SCROLL};
enum damage_type {DAMAGE_UPDATE, DAMAGE_ERASE, DAMAGE_SCROLL, DAMAGE_SCROLL_REVERSE};
struct damage {
enum damage_type type;
union {
@ -38,7 +38,7 @@ struct damage {
int length;
} range;
/* DAMAGE_SCROLL */
/* DAMAGE_SCROLL, DAMAGE_SCROLL_REVERSE */
struct {
int top_margin;
int bottom_margin;