aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/messages_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-09-16 11:04:04 +0200
committerGitHub <noreply@github.com>2022-09-16 11:04:04 +0200
commit0c0071548b4b598dcc4f9836703b1a7b0dc7c007 (patch)
tree7cb339add16d4d5806b97dd34b38725c98b111f0 /test/functional/ui/messages_spec.lua
parentb98de0e0e5df96cadbac9222ddb1caa463cea2f0 (diff)
parentb616458af90cc12ef7379d06c3ef1fde4958e62b (diff)
downloadrneovim-0c0071548b4b598dcc4f9836703b1a7b0dc7c007.tar.gz
rneovim-0c0071548b4b598dcc4f9836703b1a7b0dc7c007.tar.bz2
rneovim-0c0071548b4b598dcc4f9836703b1a7b0dc7c007.zip
Merge pull request #20213 from bfredl/redisplay
fix(messages): do not crash on cmdheight=0 and g< redisplay
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r--test/functional/ui/messages_spec.lua51
1 files changed, 51 insertions, 0 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua
index 522c9ccba2..6b8fa99b38 100644
--- a/test/functional/ui/messages_spec.lua
+++ b/test/functional/ui/messages_spec.lua
@@ -2020,4 +2020,55 @@ aliquip ex ea commodo consequat.]])
|
]]}
end)
+
+ it('with cmdheight=0 does not crash with g<', function()
+ command('set cmdheight=0')
+ feed(':ls<cr>')
+ screen:expect{grid=[[
+ |
+ {1:~ }|
+ {12: }|
+ :ls |
+ 1 %a "[No Name]" |
+ line 1 |
+ {4:Press ENTER or type command to cont}|
+ {4:inue}^ |
+ ]]}
+
+ feed('<cr>')
+ screen:expect{grid=[[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ ]]}
+
+ feed('g<lt>')
+ screen:expect{grid=[[
+ |
+ {1:~ }|
+ {12: }|
+ :ls |
+ 1 %a "[No Name]" |
+ line 1 |
+ {4:Press ENTER or type command to cont}|
+ {4:inue}^ |
+ ]]}
+
+ feed('<cr>')
+ screen:expect{grid=[[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ ]]}
+ end)
end)