mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
feedback: make an "Unbound key" message disappear on the next keystroke
When nano reports "Unbound key" or "Unknown sequence", this message should stay onscreen only for the relevant keystroke, not for any succeeding keystroke. This addresses https://savannah.gnu.org/bugs/?59119. Bug existed since before version 2.0.6.
This commit is contained in:
parent
e12f397140
commit
cb841de3fc
@ -1310,6 +1310,7 @@ void unbound_key(int code)
|
||||
else
|
||||
statusline(ALERT, _("Unbound key: %c"), code);
|
||||
#endif
|
||||
set_blankdelay_to_one();
|
||||
}
|
||||
|
||||
#ifdef ENABLE_MOUSE
|
||||
|
@ -592,6 +592,7 @@ void blank_statusbar(void);
|
||||
void wipe_statusbar(void);
|
||||
void blank_bottombars(void);
|
||||
void check_statusblank(void);
|
||||
void set_blankdelay_to_one(void);
|
||||
char *display_string(const char *buf, size_t column, size_t span,
|
||||
bool isdata, bool isprompt);
|
||||
void titlebar(const char *path);
|
||||
|
@ -1694,6 +1694,12 @@ void check_statusblank(void)
|
||||
edit_refresh();
|
||||
}
|
||||
|
||||
/* Ensure that the status bar will be wiped upon the next keystroke. */
|
||||
void set_blankdelay_to_one(void)
|
||||
{
|
||||
statusblank = 1;
|
||||
}
|
||||
|
||||
/* Convert buf into a string that can be displayed on screen. The caller
|
||||
* wants to display buf starting with the given column, and extending for
|
||||
* at most span columns. column is zero-based, and span is one-based, so
|
||||
|
Loading…
Reference in New Issue
Block a user