mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
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).
This commit is contained in:
4
screen.c
4
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);
|
||||
|
Reference in New Issue
Block a user