display: force the cursor to reappear after a message (when using Slang)

For some reason, when running a tiny nano built with Slang on the bterm
of a Debian installer image, the cursor disappears when certain things
are written to the status bar.  Make the cursor reappear by rewriting
the two help lines with dummy items (and then rewriting it again with
the normal menu in the central loop).  Of course, this does not help
when the user uses -x or --nohelp to suppress the help lines, but at
least in the default setup the cursor doesn't get hidden now and then.

This mitigates https://savannah.gnu.org/bugs/?59091.

Bug existed since before version 2.2.4.
This commit is contained in:
Benno Schulenberg 2020-09-10 18:27:04 +02:00
parent 50aa3587d4
commit d2d0c665b1
3 changed files with 14 additions and 0 deletions

View File

@ -2293,6 +2293,10 @@ 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/.

View File

@ -1303,6 +1303,10 @@ 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

View File

@ -3305,6 +3305,12 @@ void report_cursor_position(void)
_("line %zd/%zd (%d%%), col %zu/%zu (%d%%), char %zu/%zu (%d%%)"),
openfile->current->lineno, openfile->filebot->lineno, linepct,
column, fullwidth, colpct, sum, openfile->totsize, charpct);
#ifdef USE_SLANG
/* Work around a shy cursor -- https://sv.gnu.org/bugs/?59091. */
bottombars(MREPLACEWITH);
bottombars(MMAIN);
#endif
}
/* Highlight the text between the given two columns on the current line. */