aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-01-03 11:02:32 -0500
committerGitHub <noreply@github.com>2023-01-03 11:02:32 -0500
commit5e9508c702739f1e8689446b5217e83feebe5942 (patch)
treee67e5f9ca13479787f865bae1e14bf1199dbff8a /test/functional/ui
parent5eed3e741b39a7e52888b0400ba63a2ea70f4dac (diff)
parent69163727e93e5388d6cba9e6c7e1a6e64b9268b7 (diff)
downloadrneovim-5e9508c702739f1e8689446b5217e83feebe5942.tar.gz
rneovim-5e9508c702739f1e8689446b5217e83feebe5942.tar.bz2
rneovim-5e9508c702739f1e8689446b5217e83feebe5942.zip
Merge #21580 cmdline issues with cmdheight=0
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/cmdline_spec.lua36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua
index 1bdd55d66b..8e689fb378 100644
--- a/test/functional/ui/cmdline_spec.lua
+++ b/test/functional/ui/cmdline_spec.lua
@@ -1364,4 +1364,40 @@ describe('cmdheight=0', function()
]])
assert_alive()
end)
+
+ it('can only be resized to 0 if set explicitly', function()
+ command('set laststatus=2')
+ command('resize +1')
+ screen:expect([[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {2:[No Name] }|
+ |
+ ]])
+ command('set cmdheight=0')
+ command('resize -1')
+ command('resize +1')
+ screen:expect([[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {2:[No Name] }|
+ ]])
+ end)
+
+ it("clears cmdline area when resized with external messages", function()
+ clear()
+ screen = new_screen({rgb=true, ext_messages=true})
+ command('set laststatus=2 cmdheight=0')
+ command('resize -1')
+ screen:expect([[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {3:[No Name] }|
+ |
+ ]])
+ end)
end)