diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-24 06:13:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-24 06:13:24 +0800 |
commit | 951034614110cf2e4388645ee17ed4a315d0d382 (patch) | |
tree | b548a061db1dd94cc47e11363c0f6e290593ccab /test/old | |
parent | 4ed1c2a8afc71f1e3e2bc6835dc95f284782fe52 (diff) | |
download | rneovim-951034614110cf2e4388645ee17ed4a315d0d382.tar.gz rneovim-951034614110cf2e4388645ee17ed4a315d0d382.tar.bz2 rneovim-951034614110cf2e4388645ee17ed4a315d0d382.zip |
vim-patch:9.0.2125: File info disappears when 'cmdheight' has decreased (#26180)
Problem: File info disappears immediately when 'cmdheight' has just
decreased due to switching tabpage and 'shortmess' doesn't
contain 'o' or 'O'.
Solution: Make sure msg_row isn't smaller than cmdline_row.
fixes: vim/vim#13560
closes: vim/vim#13561
https://github.com/vim/vim/commit/40ed6711bd385051021691980e8ce16375b4b510
Diffstat (limited to 'test/old')
-rw-r--r-- | test/old/testdir/test_messages.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/old/testdir/test_messages.vim b/test/old/testdir/test_messages.vim index 9a999d71a8..5ebcb375b6 100644 --- a/test/old/testdir/test_messages.vim +++ b/test/old/testdir/test_messages.vim @@ -485,6 +485,29 @@ func Test_echo_string_partial() call assert_equal("function('CountSpaces', [{'ccccccccccc': ['ab', 'cd'], 'aaaaaaaaaaa': v:false, 'bbbbbbbbbbbb': ''}])", string(function('CountSpaces', [#{aaaaaaaaaaa: v:false, bbbbbbbbbbbb: '', ccccccccccc: ['ab', 'cd']}]))) endfunc +" Test that fileinfo is shown properly when 'cmdheight' has just decreased +" due to switching tabpage and 'shortmess' doesn't contain 'o' or 'O'. +func Test_fileinfo_tabpage_cmdheight() + CheckRunVimInTerminal + + let content =<< trim END + set shortmess-=o + set shortmess-=O + set shortmess-=F + tabnew + set cmdheight=2 + tabprev + edit Xfileinfo.txt + END + + call writefile(content, 'Xtest_fileinfo_tabpage_cmdheight', 'D') + let buf = RunVimInTerminal('-S Xtest_fileinfo_tabpage_cmdheight', #{rows: 6}) + call WaitForAssert({-> assert_match('^"Xfileinfo.txt" \[New\]', term_getline(buf, 6))}) + + " clean up + call StopVimInTerminal(buf) +endfunc + " Message output was previously overwritten by the fileinfo display, shown " when switching buffers. If a buffer is switched to, then a message if " echoed, we should show the message, rather than overwriting it with |