Mercurial > vim
changeset 29940:051f47c69135 v9.0.0308
patch 9.0.0308: when cmdheight is zero the attention prompt doesn't show
Commit: https://github.com/vim/vim/commit/33a5dd8b237738c15cae87441d731ab899b4e846
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 28 22:17:50 2022 +0100
patch 9.0.0308: when cmdheight is zero the attention prompt doesn't show
Problem: When cmdheight is zero the attention prompt doesn't show.
Solution: Do not use the message window for a prompt.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 28 Aug 2022 23:30:02 +0200 |
parents | 6498ad24994d |
children | fb7ea094aeec |
files | src/memline.c src/message.c src/proto/message.pro src/version.c |
diffstat | 4 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/memline.c +++ b/src/memline.c @@ -4640,6 +4640,7 @@ attention_message( stat_T st; time_t swap_mtime; + dont_use_message_window(); ++no_wait_return; (void)emsg(_(e_attention)); msg_puts(_("\nFound a swap file by the name \""));
--- a/src/message.c +++ b/src/message.c @@ -1444,6 +1444,19 @@ use_message_window(void) } /* + * Do not use the message window for the next message(s). + * Used when giving a prompt. + */ + void +dont_use_message_window(void) +{ +#ifdef HAS_MESSAGE_WINDOW + popup_hide_message_win(); + cmdline_row = Rows - 1; +#endif +} + +/* * Prepare for outputting characters in the command line. */ void @@ -4073,6 +4086,7 @@ do_dialog( } #endif + dont_use_message_window(); oldState = State; State = MODE_CONFIRM; setmouse();
--- a/src/proto/message.pro +++ b/src/proto/message.pro @@ -24,6 +24,7 @@ void wait_return(int redraw); void set_keep_msg(char_u *s, int attr); void set_keep_msg_from_hist(void); int use_message_window(void); +void dont_use_message_window(void); void msg_start(void); void msg_starthere(void); void msg_putchar(int c);