]> granicus.if.org Git - vim/commitdiff
patch 9.0.0306: buffer write message is two lines in message popup window v9.0.0306
authorBram Moolenaar <Bram@vim.org>
Sun, 28 Aug 2022 19:58:51 +0000 (20:58 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 28 Aug 2022 19:58:51 +0000 (20:58 +0100)
Problem:    Buffer write message is two lines in message popup window.
Solution:   Overwrite message if "msg_scroll" is off.

src/message.c
src/testdir/dumps/Test_cmdheight_zero_5.dump [new file with mode: 0644]
src/testdir/test_messages.vim
src/version.c

index e73b837727eddd463a428086683dbf8dbaa54816..c6fbfbd4b6b76edec2045711c18a9de748c5c761 100644 (file)
@@ -1470,10 +1470,12 @@ msg_start(void)
 #ifdef HAS_MESSAGE_WINDOW
     if (use_message_window())
     {
-       if (popup_message_win_visible() && msg_col > 0)
+       if (popup_message_win_visible() && msg_col > 0
+                                              && (msg_scroll || !full_screen))
        {
            win_T *wp = popup_get_message_win();
 
+           // start a new line
            curbuf = wp->w_buffer;
            ml_append(wp->w_buffer->b_ml.ml_line_count,
                                              (char_u *)"", (colnr_T)0, FALSE);
diff --git a/src/testdir/dumps/Test_cmdheight_zero_5.dump b/src/testdir/dumps/Test_cmdheight_zero_5.dump
new file mode 100644 (file)
index 0000000..dd64210
--- /dev/null
@@ -0,0 +1,6 @@
+|s+0&#ffffff0|o|m|e| >t|e|x|t| @65
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|═+0#e000002&@74
+|"|X|s|o|m|e|T|e|x|t|"| |[|N|e|w|]| |1|L|,| |1|0|B| |w|r|i|t@1|e|n| @41
index 7c71edc0ed4df75e032e0dbf35a5632e81a8b8f2..f714478efc61abbe855aca4a776c324eb581bd6d 100644 (file)
@@ -494,13 +494,17 @@ func Test_cmdheight_zero_dump()
   call VerifyScreenDump(buf, 'Test_cmdheight_zero_3', {})
 
   " Message for CTRL-C is in the popup window
-  "call term_sendkeys(buf, ":call popup_clear()\<CR>")
   call term_sendkeys(buf, "\<C-C>")
   call VerifyScreenDump(buf, 'Test_cmdheight_zero_4', {})
 
+  " file write message is one line
+  call term_sendkeys(buf, ":w XsomeText\<CR>")
+  call VerifyScreenDump(buf, 'Test_cmdheight_zero_5', {})
+
   " clean up
   call StopVimInTerminal(buf)
   call delete('XtestCmdheight')
+  call delete('XsomeText')
 endfunc
 
 func Test_cmdheight_zero_shell()
index e865eb548bf0e3d5bdb87cd17333b7608377cb1e..b69b74ad895261f03f297e7e2074377e86a7dd0d 100644 (file)
@@ -707,6 +707,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    306,
 /**/
     305,
 /**/