aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cmdline_spec.lua
diff options
context:
space:
mode:
authornwounkn <nwounkn@gmail.com>2023-09-24 23:15:33 +0500
committerGitHub <noreply@github.com>2023-09-24 11:15:33 -0700
commit0592fd5e17dc3609c148e0ccc25a4f035d5f7153 (patch)
tree31eba7b958dc41325df316e3154fbfb83a6831d9 /test/functional/ui/cmdline_spec.lua
parent3bbb0aa3993fb8760fa693aae2133186cb61db77 (diff)
downloadrneovim-0592fd5e17dc3609c148e0ccc25a4f035d5f7153.tar.gz
rneovim-0592fd5e17dc3609c148e0ccc25a4f035d5f7153.tar.bz2
rneovim-0592fd5e17dc3609c148e0ccc25a4f035d5f7153.zip
fix(ui): "resize -1" with cmdheight=0 #24758
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
Diffstat (limited to 'test/functional/ui/cmdline_spec.lua')
-rw-r--r--test/functional/ui/cmdline_spec.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua
index 6baad28dad..497b2e7f4c 100644
--- a/test/functional/ui/cmdline_spec.lua
+++ b/test/functional/ui/cmdline_spec.lua
@@ -1021,6 +1021,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=[[