diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-08-28 20:58:51 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-28 20:58:51 +0100 |
commit | f2fb54f641aa0e8a64356e4d0053f89b52c78229 (patch) | |
tree | d8086b698685dfb299ee0fd76dbd8e6820685eee | |
parent | 533c306921a3ac46ab92f35dfc4ebd22b3da845d (diff) | |
download | vim-git-f2fb54f641aa0e8a64356e4d0053f89b52c78229.tar.gz |
patch 9.0.0306: buffer write message is two lines in message popup windowv9.0.0306
Problem: Buffer write message is two lines in message popup window.
Solution: Overwrite message if "msg_scroll" is off.
-rw-r--r-- | src/message.c | 4 | ||||
-rw-r--r-- | src/testdir/dumps/Test_cmdheight_zero_5.dump | 6 | ||||
-rw-r--r-- | src/testdir/test_messages.vim | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 16 insertions, 2 deletions
diff --git a/src/message.c b/src/message.c index e73b83772..c6fbfbd4b 100644 --- a/src/message.c +++ b/src/message.c @@ -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 index 000000000..dd64210fc --- /dev/null +++ b/src/testdir/dumps/Test_cmdheight_zero_5.dump @@ -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 diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim index 7c71edc0e..f714478ef 100644 --- a/src/testdir/test_messages.vim +++ b/src/testdir/test_messages.vim @@ -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() diff --git a/src/version.c b/src/version.c index e865eb548..b69b74ad8 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 */ /**/ + 306, +/**/ 305, /**/ 304, |