diff options
author | nicm <nicm> | 2020-04-16 13:35:24 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-04-16 13:35:24 +0000 |
commit | b2443aa2f98c1a1fa5d53d4e79a3e7fd221cc365 (patch) | |
tree | 3cc90dfb69ef9c9c6c340639196da2815e9cf4de /screen-redraw.c | |
parent | a2e47b527986af6140a9dfa43c9448347dc0a050 (diff) | |
download | rtmux-b2443aa2f98c1a1fa5d53d4e79a3e7fd221cc365.tar.gz rtmux-b2443aa2f98c1a1fa5d53d4e79a3e7fd221cc365.tar.bz2 rtmux-b2443aa2f98c1a1fa5d53d4e79a3e7fd221cc365.zip |
Add support for the iTerm2 sychronized updates escape sequence which
drastically reduces flickering.
Diffstat (limited to 'screen-redraw.c')
-rw-r--r-- | screen-redraw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/screen-redraw.c b/screen-redraw.c index 211f7f79..c510fb68 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -435,6 +435,7 @@ screen_redraw_screen(struct client *c) flags = screen_redraw_update(c, c->flags); screen_redraw_set_context(c, &ctx); + tty_sync_start(&c->tty); if (flags & (CLIENT_REDRAWWINDOW|CLIENT_REDRAWBORDERS)) { if (ctx.pane_status != PANE_STATUS_OFF) @@ -448,7 +449,9 @@ screen_redraw_screen(struct client *c) screen_redraw_draw_status(&ctx); if (c->overlay_draw != NULL && (flags & CLIENT_REDRAWOVERLAY)) c->overlay_draw(c, &ctx); + tty_reset(&c->tty); + tty_sync_end(&c->tty); } /* Redraw a single pane. */ @@ -461,9 +464,12 @@ screen_redraw_pane(struct client *c, struct window_pane *wp) return; screen_redraw_set_context(c, &ctx); + tty_sync_start(&c->tty); screen_redraw_draw_pane(&ctx, wp); + tty_reset(&c->tty); + tty_sync_end(&c->tty); } /* Draw a border cell. */ |