aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-01 10:23:38 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-01 10:23:38 +0000
commitd70956da08c987af639fd8e03e669ca59c4c542b (patch)
tree45010a108850fc3e40970b2b4a8f5faeaf180f07 /terminal.h
parentvt: only prep logging of CSI/ESC parameters when debug logging is enabled (diff)
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.
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/terminal.h b/terminal.h
index cceaa6b6..4efaab9f 100644
--- a/terminal.h
+++ b/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;