mirror of git://git.sv.gnu.org/nano.git
feedback: skip wiping the prompt bar when the shortcut printed a message
When, at a prompt, the user chose a function shortcut instead of typing an answer, and this function printed some message to the status bar, then we do not want to wipe this message. Also: the message overwrote and cleared the prompt bar, so there is no need to wipe the latter. This fixes https://savannah.gnu.org/bugs/?56273. Bug existed since version 4.0, since justifying started giving feedback (or rather since version 4.1, since M-J no longer crashed).
This commit is contained in:
parent
53c5ace8c3
commit
2c5045bfce
|
@ -2455,7 +2455,7 @@ int main(int argc, char **argv)
|
|||
if (currmenu != MMAIN)
|
||||
bottombars(MMAIN);
|
||||
|
||||
lastmessage = HUSH;
|
||||
lastmessage = VACUUM;
|
||||
as_an_at = TRUE;
|
||||
|
||||
/* Update the displayed current cursor position only when there
|
||||
|
|
|
@ -147,7 +147,7 @@ typedef enum {
|
|||
} format_type;
|
||||
|
||||
typedef enum {
|
||||
HUSH, NOTICE, MILD, ALERT
|
||||
VACUUM, HUSH, NOTICE, MILD, ALERT
|
||||
} message_type;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -580,6 +580,8 @@ int do_prompt(bool allow_tabs, bool allow_files,
|
|||
/* Reserve five columns for colon plus angles plus answer, ":<aa>". */
|
||||
prompt[actual_x(prompt, (COLS < 5) ? 0 : COLS - 5)] = '\0';
|
||||
|
||||
lastmessage = VACUUM;
|
||||
|
||||
func = acquire_an_answer(&retval, allow_tabs, allow_files, &listed,
|
||||
history_list, refresh_func);
|
||||
free(prompt);
|
||||
|
@ -602,6 +604,7 @@ int do_prompt(bool allow_tabs, bool allow_files,
|
|||
else if (func == do_enter)
|
||||
retval = (*answer == '\0') ? -2 : 0;
|
||||
|
||||
if (lastmessage == VACUUM)
|
||||
wipe_statusbar();
|
||||
|
||||
#ifdef ENABLE_TABCOMP
|
||||
|
|
Loading…
Reference in New Issue