From 7b23878b421428d8aca5e942e5fa0f0a6ee308ce Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Fri, 19 May 2017 16:31:08 +0200
Subject: [PATCH] tweaks: do actual screen refreshes in a single call, when
 possible

---
 src/prompt.c | 3 +--
 src/winio.c  | 9 +++------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/prompt.c b/src/prompt.c
index c7c2b09e..a815beea 100644
--- a/src/prompt.c
+++ b/src/prompt.c
@@ -411,8 +411,7 @@ void update_the_statusbar(void)
 
     /* Work around a cursor-misplacement bug in VTEs. */
     wmove(bottomwin, 0, 0);
-    wnoutrefresh(bottomwin);
-    doupdate();
+    wrefresh(bottomwin);
 
     /* Place the cursor at statusbar_x in the answer. */
     column = base + statusbar_xplustabs();
diff --git a/src/winio.c b/src/winio.c
index 89210301..85bc86e9 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -2070,8 +2070,7 @@ void titlebar(const char *path)
 
     wattroff(topwin, interface_color_pair[TITLE_BAR]);
 
-    wnoutrefresh(topwin);
-    doupdate();
+    wrefresh(topwin);
 }
 
 /* Display a normal message on the statusbar, quietly. */
@@ -2163,8 +2162,7 @@ void statusline(message_type importance, const char *msg, ...)
     wattroff(bottomwin, interface_color_pair[STATUS_BAR]);
 
     /* Push the message to the screen straightaway. */
-    wnoutrefresh(bottomwin);
-    doupdate();
+    wrefresh(bottomwin);
 
     suppress_cursorpos = TRUE;
 
@@ -2242,8 +2240,7 @@ void bottombars(int menu)
 
     /* Defeat a VTE bug by moving the cursor and forcing a screen update. */
     wmove(bottomwin, 0, 0);
-    wnoutrefresh(bottomwin);
-    doupdate();
+    wrefresh(bottomwin);
 }
 
 /* Write a shortcut key to the help area at the bottom of the window.
-- 
GitLab