summaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
authornicm <nicm>2016-07-15 00:49:08 +0000
committernicm <nicm>2016-07-15 00:49:08 +0000
commit0f73af876f1222000a9eea76c70ae9a51ecb95e1 (patch)
tree8e663b7ebcb255edce0000437a2888b21852c345 /screen.c
parent1fd6ca2260bc738f1e467e7e32d03cc225327ebf (diff)
Don't update cells in each block of data read from a pane immediately,
instead track them as change (dirty) and update them once at the end, saves much time if repeatedly writing the same cell. Also fix comparison of cells being equal in a few places (memcmp is not enough).
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/screen.c b/screen.c
index 4fa8e4c9..f5f39d37 100644
--- a/screen.c
+++ b/screen.c
@@ -38,6 +38,9 @@ screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
s->ccolour = xstrdup("");
s->tabs = NULL;
+ s->dirty = NULL;
+ s->dirtysize = 0;
+
screen_reinit(s);
}
@@ -64,6 +67,7 @@ screen_reinit(struct screen *s)
void
screen_free(struct screen *s)
{
+ free(s->dirty);
free(s->tabs);
free(s->title);
free(s->ccolour);