mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
Merge pull request #20350 from bfredl/cmdfix
fix(messages): validate msg_grid before silent! message with cmdheight=0
This commit is contained in:
commit
fe045bfd5f
@ -1401,6 +1401,7 @@ void msg_start(void)
|
||||
|
||||
if (!msg_scroll && full_screen) { // overwrite last message
|
||||
if (cmdline_row >= Rows && !ui_has(kUIMessages)) {
|
||||
msg_grid_validate();
|
||||
msg_scroll_up(false, true);
|
||||
msg_scrolled++;
|
||||
cmdline_row = Rows - 1;
|
||||
|
@ -1183,4 +1183,17 @@ describe('cmdheight=0', function()
|
||||
{1:~ }|
|
||||
]]}
|
||||
end)
|
||||
|
||||
it('with silent! at startup', function()
|
||||
clear{args={'-c', 'set cmdheight=0', '-c', 'autocmd VimEnter * silent! call Foo()'}}
|
||||
screen:attach()
|
||||
-- doesn't crash while not displaying silent! error message
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
]]}
|
||||
end)
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user