// 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;
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