Mercurial > vim
comparison src/testdir/test_messages.vim @ 33819:f0ba42bd9783 v9.0.2125
patch 9.0.2125: File info disappears when 'cmdheight' has decreased
Commit: https://github.com/vim/vim/commit/40ed6711bd385051021691980e8ce16375b4b510
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu Nov 23 20:37:01 2023 +0100
patch 9.0.2125: File info disappears when 'cmdheight' has decreased
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 23 Nov 2023 20:45:05 +0100 |
parents | 695b50472e85 |
children | 321281d8b353 |
comparison
equal
deleted
inserted
replaced
33818:de9eb7b493c9 | 33819:f0ba42bd9783 |
---|---|
476 function CountSpaces() | 476 function CountSpaces() |
477 endfunction | 477 endfunction |
478 call assert_equal("function('CountSpaces', [{'ccccccccccc': ['ab', 'cd'], 'aaaaaaaaaaa': v:false, 'bbbbbbbbbbbb': ''}])", string(function('CountSpaces', [#{aaaaaaaaaaa: v:false, bbbbbbbbbbbb: '', ccccccccccc: ['ab', 'cd']}]))) | 478 call assert_equal("function('CountSpaces', [{'ccccccccccc': ['ab', 'cd'], 'aaaaaaaaaaa': v:false, 'bbbbbbbbbbbb': ''}])", string(function('CountSpaces', [#{aaaaaaaaaaa: v:false, bbbbbbbbbbbb: '', ccccccccccc: ['ab', 'cd']}]))) |
479 endfunc | 479 endfunc |
480 | 480 |
481 " Test that fileinfo is shown properly when 'cmdheight' has just decreased | |
482 " due to switching tabpage and 'shortmess' doesn't contain 'o' or 'O'. | |
483 func Test_fileinfo_tabpage_cmdheight() | |
484 CheckRunVimInTerminal | |
485 | |
486 let content =<< trim END | |
487 set shortmess-=o | |
488 set shortmess-=O | |
489 set shortmess-=F | |
490 tabnew | |
491 set cmdheight=2 | |
492 tabprev | |
493 edit Xfileinfo.txt | |
494 END | |
495 | |
496 call writefile(content, 'Xtest_fileinfo_tabpage_cmdheight', 'D') | |
497 let buf = RunVimInTerminal('-S Xtest_fileinfo_tabpage_cmdheight', #{rows: 6}) | |
498 call WaitForAssert({-> assert_match('^"Xfileinfo.txt" \[New\]', term_getline(buf, 6))}) | |
499 | |
500 " clean up | |
501 call StopVimInTerminal(buf) | |
502 endfunc | |
503 | |
481 " Message output was previously overwritten by the fileinfo display, shown | 504 " Message output was previously overwritten by the fileinfo display, shown |
482 " when switching buffers. If a buffer is switched to, then a message if | 505 " when switching buffers. If a buffer is switched to, then a message if |
483 " echoed, we should show the message, rather than overwriting it with | 506 " echoed, we should show the message, rather than overwriting it with |
484 " fileinfo. | 507 " fileinfo. |
485 func Test_fileinfo_after_echo() | 508 func Test_fileinfo_after_echo() |