From b9a1a586c0d1497011d602ffb07f797f791810ee Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 11 Sep 2020 18:29:44 +0200 Subject: [PATCH] display: force the cursor to reappear in a better way (when using Slang) The cursor would disappear after any message on the status bar -- for example, also when M-W is typed and nothing is found -- so the mitigation trick needs to be performed in statusline() itself. This addresses https://savannah.gnu.org/bugs/?59091. --- src/files.c | 4 ---- src/nano.c | 4 ---- src/winio.c | 8 ++++++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/files.c b/src/files.c index f882f390..4e0f3fbf 100644 --- a/src/files.c +++ b/src/files.c @@ -2293,10 +2293,6 @@ void do_savefile(void) { if (do_writeout(FALSE, FALSE) == 2) close_and_go(); -#ifdef USE_SLANG - /* Work around a shy cursor -- https://sv.gnu.org/bugs/?59091. */ - bottombars(MREPLACEWITH); -#endif } /* Convert the tilde notation when the given path begins with ~/ or ~user/. diff --git a/src/nano.c b/src/nano.c index 17ee0946..55b97d65 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1303,10 +1303,6 @@ void unbound_key(int code) else statusline(ALERT, _("Unbound key: %c"), code); #endif -#ifdef USE_SLANG - /* Work around a shy cursor -- https://sv.gnu.org/bugs/?59091. */ - bottombars(MREPLACEWITH); -#endif } #ifdef ENABLE_MOUSE diff --git a/src/winio.c b/src/winio.c index 55f707dd..51fa019a 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2127,6 +2127,11 @@ void statusline(message_type importance, const char *msg, ...) statusblank = 1; else statusblank = 26; + +#ifdef USE_SLANG + /* Work around a shy cursor -- https://sv.gnu.org/bugs/?59091. */ + bottombars(MGOTODIR); +#endif } /* Display a normal message on the status bar, quietly. */ @@ -3307,8 +3312,7 @@ void report_cursor_position(void) column, fullwidth, colpct, sum, openfile->totsize, charpct); #ifdef USE_SLANG - /* Work around a shy cursor -- https://sv.gnu.org/bugs/?59091. */ - bottombars(MREPLACEWITH); + /* Restore the help lines after the above call overwrote them. */ bottombars(MMAIN); #endif }