mirror of
https://github.com/neovim/neovim.git
synced 2025-01-01 17:23:36 -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 (!msg_scroll && full_screen) { // overwrite last message
|
||||||
if (cmdline_row >= Rows && !ui_has(kUIMessages)) {
|
if (cmdline_row >= Rows && !ui_has(kUIMessages)) {
|
||||||
|
msg_grid_validate();
|
||||||
msg_scroll_up(false, true);
|
msg_scroll_up(false, true);
|
||||||
msg_scrolled++;
|
msg_scrolled++;
|
||||||
cmdline_row = Rows - 1;
|
cmdline_row = Rows - 1;
|
||||||
|
@ -1183,4 +1183,17 @@ describe('cmdheight=0', function()
|
|||||||
{1:~ }|
|
{1:~ }|
|
||||||
]]}
|
]]}
|
||||||
end)
|
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)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user