mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-26 14:51:36 +03:00
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:
parent
50aa3587d4
commit
d2d0c665b1
@ -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/.
|
||||
|
@ -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
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user