From 55dbf5c3798cde8f9bfd36cd17dce636f6f6ea08 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 24 Nov 2023 10:44:19 +0800 Subject: fix(messages): validate msg_grid before using msg_grid_pos (#26189) --- test/functional/ui/messages_spec.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test') diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index a4f13aebc2..1d11a12af4 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -1402,6 +1402,19 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim ]]) eq(1, meths.get_option_value('cmdheight', {})) end) + + it('using nvim_echo in VimResized does not cause hit-enter prompt #26139', function() + command([[au VimResized * lua vim.api.nvim_echo({ { '123456' } }, true, {})]]) + screen:try_resize(60, 5) + screen:expect([[ + ^ | + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]) + eq({ mode = 'n', blocking = false }, meths.get_mode()) + end) end) it('calling screenstring() after redrawing between messages without UI #20999', function() -- cgit