aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/messages_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-11 16:46:45 +0800
committerGitHub <noreply@github.com>2022-11-11 16:46:45 +0800
commitfc7ac688c397b5f748920597fcc70fe46e907944 (patch)
tree2fffc40da4a056a5ecde04f7a655d735d9b8ea1b /test/functional/ui/messages_spec.lua
parentae67706535b23233d2d6f5a81b7c7284c3cc16f9 (diff)
downloadrneovim-fc7ac688c397b5f748920597fcc70fe46e907944.tar.gz
rneovim-fc7ac688c397b5f748920597fcc70fe46e907944.tar.bz2
rneovim-fc7ac688c397b5f748920597fcc70fe46e907944.zip
fix(messages): don't set cmdline_row when messages have scrolled (#21015)
When 'cmdheight' is changed while messages have scrolled, the position of msg_grid is not moved up, so cmdline_row should not be set based on the position of msg_grid.
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r--test/functional/ui/messages_spec.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua
index 8ca29e79d9..60b538eee5 100644
--- a/test/functional/ui/messages_spec.lua
+++ b/test/functional/ui/messages_spec.lua
@@ -1236,6 +1236,34 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim
bar^ |
]])
end)
+
+ it('consecutive calls to win_move_statusline() work after multiline message #21014',function()
+ async_meths.exec([[
+ echo "\n"
+ call win_move_statusline(0, -4)
+ call win_move_statusline(0, 4)
+ ]], false)
+ screen:expect([[
+ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {3: }|
+ |
+ {4:Press ENTER or type command to continue}^ |
+ ]])
+ feed('<CR>')
+ screen:expect([[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]])
+ eq(1, meths.get_option('cmdheight'))
+ end)
end)
it('calling screenstring() after redrawing between messages without UI #20999', function()