mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-09 08:21:01 -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
16
terminal.h
16
terminal.h
|
|
@ -62,8 +62,8 @@ struct damage {
|
|||
};
|
||||
|
||||
struct grid {
|
||||
size_t size;
|
||||
size_t offset;
|
||||
int size;
|
||||
int offset;
|
||||
|
||||
struct cell *cells;
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ struct grid {
|
|||
|
||||
struct vt_subparams {
|
||||
unsigned value[16];
|
||||
size_t idx;
|
||||
int idx;
|
||||
};
|
||||
|
||||
struct vt_param {
|
||||
|
|
@ -85,20 +85,20 @@ struct vt {
|
|||
int state; /* enum state */
|
||||
struct {
|
||||
struct vt_param v[16];
|
||||
size_t idx;
|
||||
int idx;
|
||||
} params;
|
||||
struct {
|
||||
uint8_t data[2];
|
||||
size_t idx;
|
||||
int idx;
|
||||
} intermediates;
|
||||
struct {
|
||||
uint8_t data[1024];
|
||||
size_t idx;
|
||||
int idx;
|
||||
} osc;
|
||||
struct {
|
||||
uint8_t data[4];
|
||||
size_t idx;
|
||||
size_t left;
|
||||
int idx;
|
||||
int left;
|
||||
} utf8;
|
||||
struct attributes attrs;
|
||||
bool dim;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue