From 100bc30d632c9d5d20bcabe2817634dbf96cc20d Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Sat, 27 May 2006 18:06:11 +0000
Subject: [PATCH] in check_statusblank(), avoid redundant updates when
 statusblank is 0

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3586 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog   |  2 ++
 src/winio.c | 13 +++++++------
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index eda84d6b..0b358e55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -316,6 +316,8 @@ CVS code -
   parse_verbatim_kbinput()
 	- Don't include the ability to enter a Unicode sequence via
 	  verbatim input mode if ENABLE_UTF8 isn't defined. (DLR)
+  check_statusblank()
+	- Avoid redundant updates when statusblank is 0. (DLR)
   display_string()
 	- Properly display double-column characters if they're past the
 	  first virtual page and their first column is covered by the
diff --git a/src/winio.c b/src/winio.c
index 372f919c..01edb819 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -1737,14 +1737,15 @@ void blank_bottombars(void)
  * position display is on. */
 void check_statusblank(void)
 {
-    if (statusblank > 0)
+    if (statusblank > 0) {
 	statusblank--;
 
-    if (statusblank == 0 && !ISSET(CONST_UPDATE)) {
-	blank_statusbar();
-	wnoutrefresh(bottomwin);
-	reset_cursor();
-	wnoutrefresh(edit);
+	if (statusblank == 0 && !ISSET(CONST_UPDATE)) {
+	    blank_statusbar();
+	    wnoutrefresh(bottomwin);
+	    reset_cursor();
+	    wnoutrefresh(edit);
+	}
     }
 }
 
-- 
GitLab