diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-06-16 08:01:43 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2023-06-16 08:55:03 +0800 |
| commit | cba07dad494558a4a06e25a35521041864697be3 (patch) | |
| tree | 525df0a56c87555865dca3735ac1a3dc879efba6 /test/old/testdir | |
| parent | ddba917efee26229d77f86d14a9f62dcfdc822b8 (diff) | |
| download | rneovim-cba07dad494558a4a06e25a35521041864697be3.tar.gz rneovim-cba07dad494558a4a06e25a35521041864697be3.tar.bz2 rneovim-cba07dad494558a4a06e25a35521041864697be3.zip | |
vim-patch:9.0.1634: message is cleared when removing mode message
Problem: Message is cleared when removing mode message (Gary Johnson).
Solution: Do not clear the command line after displaying a message.
https://github.com/vim/vim/commit/800cdbb7caeb5dd4379c6cb071bb12391f20bcf3
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/old/testdir')
| -rw-r--r-- | test/old/testdir/test_messages.vim | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/old/testdir/test_messages.vim b/test/old/testdir/test_messages.vim index a20571807b..766b04d154 100644 --- a/test/old/testdir/test_messages.vim +++ b/test/old/testdir/test_messages.vim @@ -341,6 +341,34 @@ func Test_message_more_scrollback() call StopVimInTerminal(buf) endfunc +func Test_message_not_cleared_after_mode() + CheckRunVimInTerminal + + let lines =<< trim END + nmap <silent> gx :call DebugSilent('normal')<CR> + vmap <silent> gx :call DebugSilent('visual')<CR> + function DebugSilent(arg) + echomsg "from DebugSilent" a:arg + endfunction + set showmode + set cmdheight=1 + call setline(1, ['one', 'two', 'three']) + END + call writefile(lines, 'XmessageMode', 'D') + let buf = RunVimInTerminal('-S XmessageMode', {'rows': 10}) + + call term_sendkeys(buf, 'gx') + call TermWait(buf) + call VerifyScreenDump(buf, 'Test_message_not_cleared_after_mode_1', {}) + + " removing the mode message used to also clear the intended message + call term_sendkeys(buf, 'vEgx') + call TermWait(buf) + call VerifyScreenDump(buf, 'Test_message_not_cleared_after_mode_2', {}) + + call StopVimInTerminal(buf) +endfunc + " Test verbose message before echo command func Test_echo_verbose_system() CheckRunVimInTerminal |