diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-23 20:37:01 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-11-23 20:37:01 +0100 |
commit | 40ed6711bd385051021691980e8ce16375b4b510 (patch) | |
tree | 602781b462eaf48c9e638e231ec8fb744df002a6 /src/testdir | |
parent | 2b0882fa6555b4d0197afbdfc32a4533cf6aacf4 (diff) |
patch 9.0.2125: File info disappears when 'cmdheight' has decreasedv9.0.2125
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: #13560
closes: #13561
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_messages.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim index 6db17460b6..48f1bab45b 100644 --- a/src/testdir/test_messages.vim +++ b/src/testdir/test_messages.vim @@ -478,6 +478,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 |