From 04652518fddb0e50495bc620054996692d0a8564 Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Sat, 16 Apr 2005 18:07:37 +0000
Subject: [PATCH] simplify total_update() to call clearok(TRUE) and wrefresh()
 on curscr, which updates the entire screen in fewer function calls

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

diff --git a/ChangeLog b/ChangeLog
index 8603f643..2cf81bc2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,10 @@ CVS code -
 - utils.c:
   num_of_digits()
 	- Use a ssize_t instead of an int. (DLR)
+- winio.c:
+  total_update()
+	- Simplify to call clearok(TRUE) and wrefresh() on curscr, which
+	  updates the entire screen in fewer function calls. (DLR)
 
 GNU nano 1.3.7 - 2005.04.10
 - General:
diff --git a/src/winio.c b/src/winio.c
index 7874a47d..b818f5a3 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -3742,16 +3742,8 @@ int do_yesno(bool all, const char *msg)
 
 void total_update(void)
 {
-    clearok(topwin, TRUE);
-    clearok(edit, TRUE);
-    clearok(bottomwin, TRUE);
-    wnoutrefresh(topwin);
-    wnoutrefresh(edit);
-    wnoutrefresh(bottomwin);
-    doupdate();
-    clearok(topwin, FALSE);
-    clearok(edit, FALSE);
-    clearok(bottomwin, FALSE);
+    clearok(curscr, TRUE);
+    wrefresh(curscr);
 }
 
 void total_refresh(void)
-- 
GitLab