aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cmdline_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-09-26 10:40:34 +0200
committerbfredl <bjorn.linse@gmail.com>2022-09-26 10:50:49 +0200
commitdb0ea1ab444c5e45fe02e1f2984aefc2eb613096 (patch)
tree1022765d7e98c8ccf7d57cb9be684088663694eb /test/functional/ui/cmdline_spec.lua
parent6596f7e136b7ceba2a94c708e2a179ec60b6d048 (diff)
downloadrneovim-db0ea1ab444c5e45fe02e1f2984aefc2eb613096.tar.gz
rneovim-db0ea1ab444c5e45fe02e1f2984aefc2eb613096.tar.bz2
rneovim-db0ea1ab444c5e45fe02e1f2984aefc2eb613096.zip
fix(messages): validate msg_grid before silent! message with cmdheight=0
fixes #20316
Diffstat (limited to 'test/functional/ui/cmdline_spec.lua')
-rw-r--r--test/functional/ui/cmdline_spec.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua
index 92eb853686..3669352901 100644
--- a/test/functional/ui/cmdline_spec.lua
+++ b/test/functional/ui/cmdline_spec.lua
@@ -1183,4 +1183,17 @@ describe('cmdheight=0', function()
{1:~ }|
]]}
end)
+
+ it('with silent! at startup', function()
+ clear{args={'-c', 'set cmdheight=0', '-c', 'autocmd VimEnter * silent! call Foo()'}}
+ screen:attach()
+ -- doesn't crash while not displaying silent! error message
+ screen:expect{grid=[[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ ]]}
+ end)
end)