mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
fix(showcmd): assert failure with cmdheight=0 (#21536)
This commit is contained in:
@@ -1990,6 +1990,9 @@ static void display_showcmd(void)
|
||||
return;
|
||||
}
|
||||
// 'showcmdloc' is "last" or empty
|
||||
if (p_ch == 0 && !ui_has(kUIMessages)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ui_has(kUIMessages)) {
|
||||
MAXSIZE_TEMP_ARRAY(content, 1);
|
||||
|
@@ -1351,4 +1351,17 @@ describe('cmdheight=0', function()
|
||||
{1:~ }│{1:~ }|
|
||||
]])
|
||||
end)
|
||||
|
||||
it('no assert failure with showcmd', function()
|
||||
command('set showcmd cmdheight=0')
|
||||
feed('d')
|
||||
screen:expect([[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
]])
|
||||
assert_alive()
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user