From 443e1484e5c0d62fe6f3b81653d267ec94a4e631 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 1 May 2017 17:32:50 +0200
Subject: [PATCH] tweaks: reshuffle help-text initialization, to elide a
 save-and-restore

---
 src/help.c | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/src/help.c b/src/help.c
index c39c0e6b..98399989 100644
--- a/src/help.c
+++ b/src/help.c
@@ -128,12 +128,6 @@ void do_help(void)
 
     fclose(fp);
 
-    /* Compose the help text from all the pieces. */
-    tabsize = 8;
-    help_init();
-    inhelp = TRUE;
-    location = 0;
-
     /* Save the settings of all flags. */
     memcpy(stash, flags, sizeof(flags));
 
@@ -156,6 +150,12 @@ void do_help(void)
     UNSET(LINE_NUMBERS);
     margin = 0;
 #endif
+    tabsize = 8;
+
+    /* Compose the help text from all the pieces. */
+    help_init();
+    inhelp = TRUE;
+    location = 0;
 
     bottombars(MHELP);
     wnoutrefresh(bottomwin);
@@ -296,12 +296,6 @@ void help_init(void)
     const subnfunc *f;
     const sc *s;
 
-#ifndef NANO_TINY
-    bool old_whitespace = ISSET(WHITESPACE_DISPLAY);
-
-    UNSET(WHITESPACE_DISPLAY);
-#endif
-
     /* First, set up the initial help text for the current function. */
     if (currmenu == MWHEREIS || currmenu == MREPLACE || currmenu == MREPLACEWITH) {
 	htx[0] = N_("Search Command Help Text\n\n "
@@ -561,9 +555,6 @@ void help_init(void)
 		}
 	}
     }
-
-    if (old_whitespace)
-	SET(WHITESPACE_DISPLAY);
 #endif /* !NANO_TINY */
 
     /* If all went well, we didn't overwrite the allocated space. */
-- 
GitLab