aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/multigrid_spec.lua
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2025-02-14 17:26:57 +0700
committerFred Sundvik <fsundvik@gmail.com>2025-03-27 18:41:57 +0700
commit424d30fe97a856426bbaffbf413ec158572cbfb9 (patch)
treed839d7cc228550c92af7f6f32d54686682a857a4 /test/functional/ui/multigrid_spec.lua
parentc5044bd021482c4bdcb7d2e3ff5b0e688daa681b (diff)
downloadrneovim-424d30fe97a856426bbaffbf413ec158572cbfb9.tar.gz
rneovim-424d30fe97a856426bbaffbf413ec158572cbfb9.tar.bz2
rneovim-424d30fe97a856426bbaffbf413ec158572cbfb9.zip
fix(ui): send multigrid message position and size when the UI is refreshed
Diffstat (limited to 'test/functional/ui/multigrid_spec.lua')
-rw-r--r--test/functional/ui/multigrid_spec.lua67
1 files changed, 67 insertions, 0 deletions
diff --git a/test/functional/ui/multigrid_spec.lua b/test/functional/ui/multigrid_spec.lua
index 9cd252264f..46342fab5b 100644
--- a/test/functional/ui/multigrid_spec.lua
+++ b/test/functional/ui/multigrid_spec.lua
@@ -2857,4 +2857,71 @@ describe('ext_multigrid', function()
}})
end)
end)
+
+ it('message grid is shown at the correct position remote re-attach', function()
+ feed(':test')
+ local expected = {
+ grid = [[
+ ## grid 1
+ [2:-----------------------------------------------------]|*12
+ {11:[No Name] }|
+ [3:-----------------------------------------------------]|
+ ## grid 2
+ |
+ {1:~ }|*11
+ ## grid 3
+ :test^ |
+ ]],
+ win_pos = {
+ [2] = {
+ height = 12,
+ startcol = 0,
+ startrow = 0,
+ width = 53,
+ win = 1000
+ }
+ },
+ win_viewport = {
+ [2] = {win = 1000, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
+ },
+ win_viewport_margins = {
+ [2] = {
+ bottom = 0,
+ left = 0,
+ right = 0,
+ top = 0,
+ win = 1000
+ }
+ },
+ reset = true
+ }
+ screen:expect(expected)
+ feed('<cr>')
+ screen:detach()
+ screen:attach()
+ feed(':test')
+ screen:expect(expected)
+ end)
+end)
+
+it('headless attach with showcmd', function()
+ clear{args={'--headless'}}
+ local screen = Screen.new(80, 24, {ext_multigrid=true})
+ command('set showcmd')
+ feed('1234')
+ screen:expect({
+ grid = [[
+ ## grid 1
+ [2:--------------------------------------------------------------------------------]|*23
+ [3:--------------------------------------------------------------------------------]|
+ ## grid 2
+ ^ |
+ {1:~ }|*22
+ ## grid 3
+ 1234 |
+ ]],
+ win_viewport = {
+ [2] = {win = 1000, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
+ },
+ })
end)