mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 09:12:07 +00:00
fix(ui): send multigrid message position and size when the UI is refreshed
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user