]> granicus.if.org Git - vim/commitdiff
patch 9.0.0308: when cmdheight is zero the attention prompt doesn't show v9.0.0308
authorBram Moolenaar <Bram@vim.org>
Sun, 28 Aug 2022 21:17:50 +0000 (22:17 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 28 Aug 2022 21:17:50 +0000 (22:17 +0100)
Problem:    When cmdheight is zero the attention prompt doesn't show.
Solution:   Do not use the message window for a prompt.

src/memline.c
src/message.c
src/proto/message.pro
src/version.c

index a49563677881efac8c38dd0d9056f4b420d2cad0..391121320b0e89398210cb5657ba3ee6bc9cb7ce 100644 (file)
@@ -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 \""));
index c6fbfbd4b6b76edec2045711c18a9de748c5c761..096f274dd30fc8902a9ee862f468628effaa15b1 100644 (file)
@@ -1443,6 +1443,19 @@ use_message_window(void)
 #endif
 }
 
+/*
+ * 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.
  */
@@ -4073,6 +4086,7 @@ do_dialog(
     }
 #endif
 
+    dont_use_message_window();
     oldState = State;
     State = MODE_CONFIRM;
     setmouse();
index bea30160dc7c234dd4ccd52a3670820d288a298c..f0bd4f3364b7d591a6e8716e3874962eec07d03b 100644 (file)
@@ -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);
index 80ce6fedeafe720a6e5d1260d1a2f9ea72ef37cb..eb05f9a0c4fe6b8ef2459e7573404e3407419186 100644 (file)
@@ -707,6 +707,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    308,
 /**/
     307,
 /**/