From 21a39c997b82b50b0307e836e4f11f9db6a84e55 Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 16 May 2020 14:42:06 +0000 Subject: Do not redraw or update mode if nothing has changed. --- screen-redraw.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'screen-redraw.c') diff --git a/screen-redraw.c b/screen-redraw.c index 8e74fe97..5ca6024d 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -434,7 +434,11 @@ screen_redraw_screen(struct client *c) return; flags = screen_redraw_update(c, c->flags); + if ((flags & CLIENT_ALLREDRAWFLAGS) == 0) + return; + screen_redraw_set_context(c, &ctx); + tty_update_mode(&c->tty, c->tty.mode, NULL); tty_sync_start(&c->tty); if (flags & (CLIENT_REDRAWWINDOW|CLIENT_REDRAWBORDERS)) { @@ -470,6 +474,7 @@ screen_redraw_pane(struct client *c, struct window_pane *wp) return; screen_redraw_set_context(c, &ctx); + tty_update_mode(&c->tty, c->tty.mode, NULL); tty_sync_start(&c->tty); screen_redraw_draw_pane(&ctx, wp); -- cgit