summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-08-28 22:17:50 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-28 22:17:50 +0100
commit33a5dd8b237738c15cae87441d731ab899b4e846 (patch)
treed186bc7e0f4a34428a69365342fcde7e97742a82
parent134b86553c12c46e0ae7d534f6fe65e8ba2d50bc (diff)
downloadvim-git-33a5dd8b237738c15cae87441d731ab899b4e846.tar.gz
patch 9.0.0308: when cmdheight is zero the attention prompt doesn't showv9.0.0308
Problem: When cmdheight is zero the attention prompt doesn't show. Solution: Do not use the message window for a prompt.
-rw-r--r--src/memline.c1
-rw-r--r--src/message.c14
-rw-r--r--src/proto/message.pro1
-rw-r--r--src/version.c2
4 files changed, 18 insertions, 0 deletions
diff --git a/src/memline.c b/src/memline.c
index a49563677..391121320 100644
--- 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 \""));
diff --git a/src/message.c b/src/message.c
index c6fbfbd4b..096f274dd 100644
--- 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();
diff --git a/src/proto/message.pro b/src/proto/message.pro
index bea30160d..f0bd4f336 100644
--- 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);
diff --git a/src/version.c b/src/version.c
index 80ce6fede..eb05f9a0c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -708,6 +708,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 308,
+/**/
307,
/**/
306,