diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-09-16 10:31:37 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-09-16 10:33:12 +0200 |
commit | b616458af90cc12ef7379d06c3ef1fde4958e62b (patch) | |
tree | bc295058422a7314130442655bbae970cd7122bf /test/functional/ui/messages_spec.lua | |
parent | 0b7a3c173c929085f54a178c9fa852481d5f021e (diff) | |
download | rneovim-b616458af90cc12ef7379d06c3ef1fde4958e62b.tar.gz rneovim-b616458af90cc12ef7379d06c3ef1fde4958e62b.tar.bz2 rneovim-b616458af90cc12ef7379d06c3ef1fde4958e62b.zip |
fix(messages): do not crash on cmdheight=0 and g< redisplay
fixes #20153
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r-- | test/functional/ui/messages_spec.lua | 51 |
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) |