mirror of
https://github.com/neovim/neovim.git
synced 2026-08-28 18:11:47 +00:00
fix(ui): "resize -1" with cmdheight=0
Problem:
Crash from:
set cmdheight=0 redrawdebug=invalid
resize -1
Solution:
Do not invalidate first `p_ch` `msg_grid` rows in `update_screen` when
scrolling the screen down after displaying a message, because they may
be used later for drawing cmdline.
Fixes #22154
This commit is contained in:
@@ -1011,6 +1011,26 @@ describe('cmdheight=0', function()
|
||||
screen:attach()
|
||||
end)
|
||||
|
||||
it("with redrawdebug=invalid resize -1", function()
|
||||
command("set redrawdebug=invalid cmdheight=0 noruler laststatus=0")
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
]]}
|
||||
feed(":resize -1<CR>")
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
|
|
||||
]]}
|
||||
assert_alive()
|
||||
end)
|
||||
|
||||
it("with cmdheight=1 noruler laststatus=2", function()
|
||||
command("set cmdheight=1 noruler laststatus=2")
|
||||
screen:expect{grid=[[
|
||||
|
||||
Reference in New Issue
Block a user