diff options
Diffstat (limited to 'test/functional/ui/multigrid_spec.lua')
-rw-r--r-- | test/functional/ui/multigrid_spec.lua | 67 |
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) |