mirror of
https://github.com/vim/vim.git
synced 2025-08-26 20:03:41 -04:00
patch 9.1.1155: Mode message not cleared after :silent message
Problem: Mode message not cleared after :silent message (after 9.0.1634). Solution: Don't reset mode_displayed when the message is empty. (zeertzjq) fixes: neovim/neovim#32641 closes: #16744 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
0b8205484b
commit
fce1fa5b61
@ -1747,7 +1747,7 @@ msg_outtrans_len_attr(char_u *msgstr, int len, int attr)
|
||||
|
||||
// When drawing over the command line no need to clear it later or remove
|
||||
// the mode message.
|
||||
if (msg_row >= cmdline_row && msg_col == 0)
|
||||
if (msg_silent == 0 && len > 0 && msg_row >= cmdline_row && msg_col == 0)
|
||||
{
|
||||
clear_cmdline = FALSE;
|
||||
mode_displayed = FALSE;
|
||||
|
@ -0,0 +1,10 @@
|
||||
>f+0&#ffffff0|o@1|b|a|r| @68
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|-+2#0000000&@1| |V|I|S|U|A|L| |-@1| +0&&@34|1| @8|1|,|1| @10|A|l@1|
|
@ -0,0 +1,10 @@
|
||||
>o+0&#ffffff0@1|b|a|r| @69
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|1|,|1| @10|A|l@1|
|
@ -382,6 +382,29 @@ func Test_message_not_cleared_after_mode()
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
func Test_mode_cleared_after_silent_message()
|
||||
CheckRunVimInTerminal
|
||||
|
||||
let lines =<< trim END
|
||||
edit XsilentMessageMode.txt
|
||||
call setline(1, 'foobar')
|
||||
autocmd TextChanged * silent update
|
||||
END
|
||||
call writefile(lines, 'XsilentMessageMode', 'D')
|
||||
let buf = RunVimInTerminal('-S XsilentMessageMode', {'rows': 10})
|
||||
|
||||
call term_sendkeys(buf, 'v')
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_mode_cleared_after_silent_message_1', {})
|
||||
|
||||
call term_sendkeys(buf, 'd')
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_mode_cleared_after_silent_message_2', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('XsilentMessageMode.txt')
|
||||
endfunc
|
||||
|
||||
" Test verbose message before echo command
|
||||
func Test_echo_verbose_system()
|
||||
CheckRunVimInTerminal
|
||||
|
@ -704,6 +704,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1155,
|
||||
/**/
|
||||
1154,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user