nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 280ac81b31106e39809d1e0042a0e56c4cf590fa
parent b7f53096fb6a17089171778802806bff0f50fc11
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 21 Oct 2018 20:47:37 +0200

display: ensure that the help lines are shown when in linting mode

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.

Diffstat:
Msrc/text.c | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git 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 helpless = ISSET(NO_HELP); static char **lintargs = NULL; lintstruct *lints = NULL, *tmplint = NULL, *curlint = NULL; time_t last_wait = 0; @@ -3173,6 +3174,11 @@ void do_linter(void) return; } + if (helpless && LINES > 4) { + UNSET(NO_HELP); + window_init(); + } + /* Show that we are in the linter now. */ titlebar(NULL); bottombars(MLINTER); @@ -3322,6 +3328,12 @@ void do_linter(void) free(tmplint->filename); free(tmplint); } + + if (helpless) { + SET(NO_HELP); + window_init(); + refresh_needed = TRUE; + } } #endif /* ENABLE_COLOR */