[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH 3/3] display: ensure that the help lines are shown w
From: |
Benno Schulenberg |
Subject: |
[Nano-devel] [PATCH 3/3] display: ensure that the help lines are shown when in linting mode |
Date: |
Sun, 21 Oct 2018 20:52:18 +0200 |
The help lines will help differentiate this mode from normal editing
mode, and will tell the user how to jump to other messages.
This is a third step to address https://savannah.gnu.org/bugs/?54714.
---
src/text.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/text.c b/src/text.c
index 4671a0f2..7ac640ff 100644
--- a/src/text.c
+++ b/src/text.c
@@ -2999,6 +2999,7 @@ void do_linter(void)
size_t parsesuccess = 0;
int lint_status, lint_fd[2];
pid_t pid_lint;
+ bool was_helpless = ISSET(NO_HELP);
static char **lintargs = NULL;
lintstruct *lints = NULL, *tmplint = NULL, *curlint = NULL;
@@ -3172,6 +3173,11 @@ void do_linter(void)
return;
}
+ if (ISSET(NO_HELP) && LINES > 4) {
+ UNSET(NO_HELP);
+ window_init();
+ }
+
/* Show that we are in the linter now. */
titlebar(NULL);
bottombars(MLINTER);
@@ -3319,6 +3325,12 @@ void do_linter(void)
free(tmplint->filename);
free(tmplint);
}
+
+ if (was_helpless) {
+ SET(NO_HELP);
+ window_init();
+ refresh_needed = TRUE;
+ }
}
#endif /* ENABLE_COLOR */
--
2.19.1