aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/multigrid_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui/multigrid_spec.lua')
-rw-r--r--test/functional/ui/multigrid_spec.lua2645
1 files changed, 437 insertions, 2208 deletions
diff --git a/test/functional/ui/multigrid_spec.lua b/test/functional/ui/multigrid_spec.lua
index 5b982df2b5..c1d3af085f 100644
--- a/test/functional/ui/multigrid_spec.lua
+++ b/test/functional/ui/multigrid_spec.lua
@@ -3,9 +3,9 @@ local Screen = require('test.functional.ui.screen')
local clear = helpers.clear
local feed, command, insert = helpers.feed, helpers.command, helpers.insert
local eq = helpers.eq
-local funcs = helpers.funcs
-local meths = helpers.meths
-local curwin = helpers.curwin
+local fn = helpers.fn
+local api = helpers.api
+local curwin = helpers.api.nvim_get_current_win
local poke_eventloop = helpers.poke_eventloop
@@ -36,7 +36,7 @@ describe('ext_multigrid', function()
[17] = {background = Screen.colors.LightGrey, underline = true, bold = true, foreground = Screen.colors.Magenta},
[18] = {bold = true, foreground = Screen.colors.Magenta},
[19] = {foreground = Screen.colors.Brown},
- [20] = {background = Screen.colors.LightGrey},
+ [20] = {background = Screen.colors.LightGrey, foreground = Screen.colors.Black},
[21] = {background = Screen.colors.LightMagenta},
[22] = {background = Screen.colors.LightMagenta, bold = true, foreground = Screen.colors.Blue},
[23] = {background = Screen.colors.Grey90},
@@ -47,33 +47,12 @@ describe('ext_multigrid', function()
it('default initial screen', function()
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 3
|
]]}
@@ -83,144 +62,71 @@ describe('ext_multigrid', function()
command('vsplit')
screen:expect{grid=[[
## grid 1
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
+ [4:--------------------------]│[2:--------------------------]|*12
{11:[No Name] }{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 3
|
## grid 4
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
]], condition=function()
eq({
- [2] = { win = {id=1000}, startrow = 0, startcol = 27, width = 26, height = 12 },
- [4] = { win = {id=1001}, startrow = 0, startcol = 0, width = 26, height = 12 }
+ [2] = { win = 1000, startrow = 0, startcol = 27, width = 26, height = 12 },
+ [4] = { win = 1001, startrow = 0, startcol = 0, width = 26, height = 12 }
}, screen.win_position)
end}
command('wincmd l')
command('split')
screen:expect{grid=[[
## grid 1
- [4:--------------------------]│[5:--------------------------]|
- [4:--------------------------]│[5:--------------------------]|
- [4:--------------------------]│[5:--------------------------]|
- [4:--------------------------]│[5:--------------------------]|
- [4:--------------------------]│[5:--------------------------]|
- [4:--------------------------]│[5:--------------------------]|
+ [4:--------------------------]│[5:--------------------------]|*6
[4:--------------------------]│{11:[No Name] }|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
+ [4:--------------------------]│[2:--------------------------]|*5
{12:[No Name] [No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
|
## grid 4
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 5
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]], condition=function()
eq({
- [2] = { win = {id=1000}, startrow = 7, startcol = 27, width = 26, height = 5 },
- [4] = { win = {id=1001}, startrow = 0, startcol = 0, width = 26, height = 12 },
- [5] = { win = {id=1002}, startrow = 0, startcol = 27, width = 26, height = 6 }
+ [2] = { win = 1000, startrow = 7, startcol = 27, width = 26, height = 5 },
+ [4] = { win = 1001, startrow = 0, startcol = 0, width = 26, height = 12 },
+ [5] = { win = 1002, startrow = 0, startcol = 27, width = 26, height = 6 }
}, screen.win_position)
end}
command('wincmd h')
command('q')
screen:expect{grid=[[
## grid 1
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
+ [5:-----------------------------------------------------]|*6
{11:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
|
## grid 5
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]], condition=function()
eq({
- [2] = { win = {id=1000}, startrow = 7, startcol = 0, width = 53, height = 5 },
- [5] = { win = {id=1002}, startrow = 0, startcol = 0, width = 53, height = 6 }
+ [2] = { win = 1000, startrow = 7, startcol = 0, width = 53, height = 5 },
+ [5] = { win = 1002, startrow = 0, startcol = 0, width = 53, height = 6 }
}, screen.win_position)
end}
end)
@@ -231,35 +137,19 @@ describe('ext_multigrid', function()
command('sp')
screen:expect([[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
|
## grid 4
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]])
end)
@@ -268,35 +158,19 @@ describe('ext_multigrid', function()
command('resize 8')
screen:expect([[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*8
{11:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*3
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*2
## grid 3
|
## grid 4
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*7
]])
end)
@@ -306,162 +180,77 @@ describe('ext_multigrid', function()
command('vsp')
screen:expect{grid=[[
## grid 1
- [6:--------------------]│[5:----------------]│[4:---------------]|
- [6:--------------------]│[5:----------------]│[4:---------------]|
- [6:--------------------]│[5:----------------]│[4:---------------]|
- [6:--------------------]│[5:----------------]│[4:---------------]|
- [6:--------------------]│[5:----------------]│[4:---------------]|
- [6:--------------------]│[5:----------------]│[4:---------------]|
+ [6:--------------------]│[5:----------------]│[4:---------------]|*6
{11:[No Name] }{12:[No Name] [No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
|
## grid 4
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 5
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 6
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
insert('hello')
screen:expect{grid=[[
## grid 1
- [6:--------------------]│[5:----------------]│[4:---------------]|
- [6:--------------------]│[5:----------------]│[4:---------------]|
- [6:--------------------]│[5:----------------]│[4:---------------]|
- [6:--------------------]│[5:----------------]│[4:---------------]|
- [6:--------------------]│[5:----------------]│[4:---------------]|
- [6:--------------------]│[5:----------------]│[4:---------------]|
+ [6:--------------------]│[5:----------------]│[4:---------------]|*6
{11:[No Name] [+] }{12:[No Name] [+] [No Name] [+] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
hello |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
|
## grid 4
hello |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 5
hello |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 6
hell^o |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
end)
it('closes splits', function ()
command('sp')
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
|
## grid 4
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
command('q')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 3
|
]]}
@@ -473,48 +262,17 @@ describe('ext_multigrid', function()
command('vsp')
screen:expect{grid=[[
## grid 1
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
+ [4:--------------------------]│[2:--------------------------]|*12
{11:[No Name] }{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 3
|
## grid 4
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
]]}
end)
it('resizes grids', function ()
@@ -522,48 +280,17 @@ describe('ext_multigrid', function()
command('vertical resize 10')
screen:expect{grid=[[
## grid 1
- [4:----------]│[2:------------------------------------------]|
- [4:----------]│[2:------------------------------------------]|
- [4:----------]│[2:------------------------------------------]|
- [4:----------]│[2:------------------------------------------]|
- [4:----------]│[2:------------------------------------------]|
- [4:----------]│[2:------------------------------------------]|
- [4:----------]│[2:------------------------------------------]|
- [4:----------]│[2:------------------------------------------]|
- [4:----------]│[2:------------------------------------------]|
- [4:----------]│[2:------------------------------------------]|
- [4:----------]│[2:------------------------------------------]|
- [4:----------]│[2:------------------------------------------]|
+ [4:----------]│[2:------------------------------------------]|*12
{11:<No Name] }{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 3
|
## grid 4
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
]]}
end)
it('splits horizontally', function ()
@@ -571,173 +298,69 @@ describe('ext_multigrid', function()
command('sp')
screen:expect{grid=[[
## grid 1
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
+ [5:--------------------------]│[2:--------------------------]|*6
{11:[No Name] }│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
+ [4:--------------------------]│[2:--------------------------]|*5
{12:[No Name] [No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 3
|
## grid 4
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 5
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
insert('hello')
screen:expect{grid=[[
## grid 1
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
+ [5:--------------------------]│[2:--------------------------]|*6
{11:[No Name] [+] }│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
+ [4:--------------------------]│[2:--------------------------]|*5
{12:[No Name] [+] [No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
hello |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 3
|
## grid 4
hello |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 5
hell^o |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
end)
it('closes splits', function ()
command('vsp')
screen:expect{grid=[[
## grid 1
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
+ [4:--------------------------]│[2:--------------------------]|*12
{11:[No Name] }{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 3
|
## grid 4
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
]]}
command('q')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 3
|
]]}
@@ -750,17 +373,12 @@ describe('ext_multigrid', function()
screen:try_resize(25, 6)
screen:expect{grid=[[
## grid 1
- [2:-------------------------]|
- [2:-------------------------]|
- [2:-------------------------]|
- [2:-------------------------]|
+ [2:-------------------------]|*4
{11:[No Name] }|
[3:-------------------------]|
## grid 2
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
|
]]}
@@ -799,26 +417,12 @@ describe('ext_multigrid', function()
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
|
]]}
@@ -831,41 +435,12 @@ describe('ext_multigrid', function()
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*19
## grid 3
|
]]}
@@ -879,52 +454,30 @@ describe('ext_multigrid', function()
end)
it('winwidth() winheight() getwininfo() return inner width and height #19743', function()
- eq(60, funcs.winwidth(0))
- eq(20, funcs.winheight(0))
- local win_info = funcs.getwininfo(curwin().id)[1]
+ eq(60, fn.winwidth(0))
+ eq(20, fn.winheight(0))
+ local win_info = fn.getwininfo(curwin())[1]
eq(60, win_info.width)
eq(20, win_info.height)
end)
+ it("'scroll' option works properly", function()
+ eq(10, api.nvim_get_option_value('scroll', { win = 0 }))
+ api.nvim_set_option_value('scroll', 15, { win = 0 })
+ eq(15, api.nvim_get_option_value('scroll', { win = 0 }))
+ end)
+
it('gets written till grid width', function()
insert(('a'):rep(60).."\n")
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*18
## grid 3
|
]]}
@@ -936,82 +489,24 @@ describe('ext_multigrid', function()
feed('0')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa哦|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*19
## grid 3
|
]]}
feed('g$')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^哦|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*19
## grid 3
|
]]}
@@ -1021,41 +516,14 @@ describe('ext_multigrid', function()
insert(('b'):rep(160).."\n")
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
- bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
- bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
+ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*2
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*16
## grid 3
|
]]}
@@ -1063,18 +531,7 @@ describe('ext_multigrid', function()
command('setlocal cursorline cursorlineopt=screenline')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
@@ -1082,22 +539,7 @@ describe('ext_multigrid', function()
{23:^bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb}|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*16
## grid 3
|
]]}
@@ -1108,41 +550,12 @@ describe('ext_multigrid', function()
' long message"')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*19
## grid 3
this is a very very very...ry very very long message |
]]}
@@ -1153,41 +566,13 @@ describe('ext_multigrid', function()
feed('kzfgg')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
{13:^+-- 2 lines: this is a fold································}|
this is outside fold |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*18
## grid 3
|
]]}
@@ -1197,46 +582,18 @@ describe('ext_multigrid', function()
insert(('c'):rep(1111))
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
+ cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|*18
cccccccccccccccccccccccccccccc^c |
{1:~ }|
## grid 3
|
]]}
- local float_buf = meths.create_buf(false, false)
- meths.open_win(float_buf, false, {
+ local float_buf = api.nvim_create_buf(false, false)
+ api.nvim_open_win(float_buf, false, {
relative = 'win',
win = curwin(),
bufpos = {0, 1018},
@@ -1246,51 +603,20 @@ describe('ext_multigrid', function()
})
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
- cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|
+ cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc|*18
cccccccccccccccccccccccccccccc^c |
{1:~ }|
## grid 3
|
## grid 4
{21: }|
- {22:~ }|
- {22:~ }|
- {22:~ }|
- {22:~ }|
+ {22:~ }|*4
]], float_pos={
- [4] = {{id = 1001}, "SE", 2, 16, 58, true, 50};
+ [4] = {1001, "SE", 2, 16, 58, true, 50};
}}
end)
@@ -1299,48 +625,20 @@ describe('ext_multigrid', function()
feed('A<C-X><C-N>')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
+ |*14
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
{7:-- Keyword Local completion (^N^P) }{15:match 1 of 2} |
## grid 4
{24: foo}|
{21: bar}|
]], float_pos={
- [4] = {{id = -1}, "NW", 2, 15, 55, false, 100};
+ [4] = {-1, "NW", 2, 15, 55, false, 100};
}}
feed('<C-E><Esc>')
@@ -1348,48 +646,21 @@ describe('ext_multigrid', function()
feed('o<C-X><C-N>')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
+ |*14
rab oof rab oof rab oof rab oof rab oof rab oof rab oof|
^ oof|
- {1: ~}|
- {1: ~}|
- {1: ~}|
- {1: ~}|
+ {1: ~}|*4
## grid 3
{7:-- Keyword Local completion (^N^P) }{15:match 1 of 2} |
## grid 4
{24: oof}|
{21: rab}|
]], float_pos={
- [4] = {{id = -1}, "NW", 2, 16, 45, false, 100};
+ [4] = {-1, "NW", 2, 16, 45, false, 100};
}}
feed('<C-E><Esc>')
@@ -1397,48 +668,21 @@ describe('ext_multigrid', function()
feed(':sign un<Tab>')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
+ |*14
rab oof rab oof rab oof rab oof rab oof rab oof rab oof|
|
- {1: ~}|
- {1: ~}|
- {1: ~}|
- {1: ~}|
+ {1: ~}|*4
## grid 3
:sign undefine^ |
## grid 4
{24: undefine }|
{21: unplace }|
]], float_pos={
- [4] = {{id = -1}, "SW", 1, 13, 5, false, 250};
+ [4] = {-1, "SW", 1, 13, 5, false, 250};
}}
end)
end)
@@ -1448,67 +692,34 @@ describe('ext_multigrid', function()
command('vsp')
screen:expect{grid=[[
## grid 1
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
+ [5:--------------------------]│[4:--------------------------]|*6
{11:[No Name] }{12:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
|
## grid 4
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 5
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
feed(":echoerr 'very' | echoerr 'much' | echoerr 'fail'<cr>")
screen:expect{grid=[[
## grid 1
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
+ [5:--------------------------]│[4:--------------------------]|*6
{11:[No Name] }{12:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*3
+ [3:-----------------------------------------------------]|*4
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
{14:very} |
{14:much} |
@@ -1516,59 +727,31 @@ describe('ext_multigrid', function()
{15:Press ENTER or type command to continue}^ |
## grid 4
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 5
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
feed('<cr>')
screen:expect{grid=[[
## grid 1
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
+ [5:--------------------------]│[4:--------------------------]|*6
{11:[No Name] }{12:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
|
## grid 4
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 5
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
command([[
@@ -1580,26 +763,10 @@ describe('ext_multigrid', function()
feed(":call ErrMsg()<cr>")
screen:expect{grid=[[
## grid 1
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
+ [3:-----------------------------------------------------]|*14
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
{14:Error detected while processing function ErrMsg:} |
{19:line 2:} |
@@ -1617,59 +784,31 @@ describe('ext_multigrid', function()
{15:Press ENTER or type command to continue}^ |
## grid 4
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 5
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
feed("<c-c>")
screen:expect{grid=[[
## grid 1
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
- [5:--------------------------]│[4:--------------------------]|
+ [5:--------------------------]│[4:--------------------------]|*6
{11:[No Name] }{12:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
|
## grid 4
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 5
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
end)
@@ -1677,48 +816,17 @@ describe('ext_multigrid', function()
command('vsp')
screen:expect{grid=[[
## grid 1
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
+ [4:--------------------------]│[2:--------------------------]|*12
{11:[No Name] }{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 3
|
## grid 4
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
]]}
@@ -1727,232 +835,93 @@ describe('ext_multigrid', function()
screen:expect{grid=[[
## grid 1
{16: }{17:2}{16: [No Name] }{7: [No Name] }{12: }{16:X}|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
+ [5:-----------------------------------------------------]|*11
{11:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2 (hidden)
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 3
|
## grid 4 (hidden)
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 5
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*10
]]}
command('sp')
screen:expect{grid=[[
## grid 1
{16: }{17:2}{16: [No Name] }{7: }{18:2}{7: [No Name] }{12: }{16:X}|
- [6:-----------------------------------------------------]|
- [6:-----------------------------------------------------]|
- [6:-----------------------------------------------------]|
- [6:-----------------------------------------------------]|
- [6:-----------------------------------------------------]|
+ [6:-----------------------------------------------------]|*5
{11:[No Name] }|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
+ [5:-----------------------------------------------------]|*5
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2 (hidden)
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 3
|
## grid 4 (hidden)
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 5
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 6
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
]]}
command('tabnext')
screen:expect{grid=[[
## grid 1
{7: }{18:2}{7: [No Name] }{16: }{17:2}{16: [No Name] }{12: }{16:X}|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
+ [4:--------------------------]│[2:--------------------------]|*11
{11:[No Name] }{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*10
## grid 3
|
## grid 4
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*10
## grid 5 (hidden)
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 6 (hidden)
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
]]}
command('tabnext')
screen:expect{grid=[[
## grid 1
{16: }{17:2}{16: [No Name] }{7: }{18:2}{7: [No Name] }{12: }{16:X}|
- [6:-----------------------------------------------------]|
- [6:-----------------------------------------------------]|
- [6:-----------------------------------------------------]|
- [6:-----------------------------------------------------]|
- [6:-----------------------------------------------------]|
+ [6:-----------------------------------------------------]|*5
{11:[No Name] }|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
- [5:-----------------------------------------------------]|
+ [5:-----------------------------------------------------]|*5
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2 (hidden)
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*10
## grid 3
|
## grid 4 (hidden)
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*10
## grid 5
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 6
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
]]}
command('tabnext')
@@ -1960,117 +929,43 @@ describe('ext_multigrid', function()
screen:expect{grid=[[
## grid 1
{16: }{17:2}{16: [No Name] }{17:2}{16: [No Name] }{7: [No Name] }{12: }{16:X}|
- [7:-----------------------------------------------------]|
- [7:-----------------------------------------------------]|
- [7:-----------------------------------------------------]|
- [7:-----------------------------------------------------]|
- [7:-----------------------------------------------------]|
- [7:-----------------------------------------------------]|
- [7:-----------------------------------------------------]|
- [7:-----------------------------------------------------]|
- [7:-----------------------------------------------------]|
- [7:-----------------------------------------------------]|
- [7:-----------------------------------------------------]|
+ [7:-----------------------------------------------------]|*11
{11:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2 (hidden)
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*10
## grid 3
|
## grid 4 (hidden)
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*10
## grid 5 (hidden)
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 6 (hidden)
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 7
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*10
]]}
command('tabclose')
command('tabclose')
screen:expect{grid=[[
## grid 1
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
+ [4:--------------------------]│[2:--------------------------]|*12
{11:[No Name] }{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 3
|
## grid 4
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
]]}
end)
@@ -2078,67 +973,27 @@ describe('ext_multigrid', function()
insert('some text\nto be clicked')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicke^d |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*10
## grid 3
|
]]}
- meths.input_mouse('left', 'press', '', 2, 0, 5)
+ api.nvim_input_mouse('left', 'press', '', 2, 0, 5)
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some ^text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*10
## grid 3
|
]]}
@@ -2148,128 +1003,75 @@ describe('ext_multigrid', function()
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] [+] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
|
## grid 4
Lorem ipsum dolor sit amet, consectetur adipiscing el|
it, sed do eiusm^o |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
]]}
- meths.input_mouse('left', 'press', '', 2, 1, 6)
+ api.nvim_input_mouse('left', 'press', '', 2, 1, 6)
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{12:[No Name] [+] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be ^clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
|
## grid 4
Lorem ipsum dolor sit amet, consectetur adipiscing el|
it, sed do eiusmo |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
]]}
- meths.input_mouse('left', 'press', '', 4, 1, 4)
+ api.nvim_input_mouse('left', 'press', '', 4, 1, 4)
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] [+] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
|
## grid 4
Lorem ipsum dolor sit amet, consectetur adipiscing el|
it, ^sed do eiusmo |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
]]}
screen:try_resize_grid(4, 80, 2)
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] [+] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
|
## grid 4
@@ -2277,29 +1079,18 @@ describe('ext_multigrid', function()
{1:~ }|
]]}
- meths.input_mouse('left', 'press', '', 4, 0, 64)
+ api.nvim_input_mouse('left', 'press', '', 4, 0, 64)
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] [+] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
|
## grid 4
@@ -2308,36 +1099,23 @@ describe('ext_multigrid', function()
]]}
-- XXX: mouse_check_grid() doesn't work properly when clicking on grid 1
- meths.input_mouse('left', 'press', '', 1, 6, 20)
+ api.nvim_input_mouse('left', 'press', '', 1, 6, 20)
-- TODO(bfredl): "batching" input_mouse is formally not supported yet.
-- Normally it should work fine in async context when nvim is not blocked,
-- but add a poke_eventloop be sure.
poke_eventloop()
- meths.input_mouse('left', 'drag', '', 1, 4, 20)
+ api.nvim_input_mouse('left', 'drag', '', 1, 4, 20)
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*4
{11:[No Name] [+] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*7
{12:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
|
## grid 4
@@ -2348,28 +1126,15 @@ describe('ext_multigrid', function()
feed('<c-w><c-w><c-w>v')
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*4
{12:[No Name] [+] }|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
- [5:--------------------------]│[2:--------------------------]|
+ [5:--------------------------]│[2:--------------------------]|*7
{11:[No Name] [+] }{12:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
|
## grid 4
@@ -2378,40 +1143,23 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be ^clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
- meths.input_mouse('left', 'press', '', 1, 8, 26)
+ api.nvim_input_mouse('left', 'press', '', 1, 8, 26)
poke_eventloop()
- meths.input_mouse('left', 'drag', '', 1, 6, 30)
+ api.nvim_input_mouse('left', 'drag', '', 1, 6, 30)
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*4
{12:[No Name] [+] }|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*7
{11:[No Name] [+] }{12:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
|
## grid 4
@@ -2420,41 +1168,24 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be ^clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
command('aunmenu PopUp | vmenu PopUp.Copy y')
- funcs.setreg('"', '')
- meths.input_mouse('left', 'press', '2', 2, 1, 6)
+ fn.setreg('"', '')
+ api.nvim_input_mouse('left', 'press', '2', 2, 1, 6)
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*4
{12:[No Name] [+] }|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*7
{12:[No Name] [+] }{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be {20:clicke}^d |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
{7:-- VISUAL --} |
## grid 4
@@ -2463,38 +1194,21 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be {20:clicked} |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
- meths.input_mouse('right', 'press', '', 2, 1, 6)
- meths.input_mouse('right', 'release', '', 2, 1, 6)
+ api.nvim_input_mouse('right', 'press', '', 2, 1, 6)
+ api.nvim_input_mouse('right', 'release', '', 2, 1, 6)
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*4
{12:[No Name] [+] }|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*7
{12:[No Name] [+] }{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be {20:clicke}^d |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
{7:-- VISUAL --} |
## grid 4
@@ -2503,41 +1217,24 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be {20:clicked} |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 6
{21: Copy }|
]], float_pos={
- [6] = {{id = -1}, "NW", 2, 2, 5, false, 250};
+ [6] = {-1, "NW", 2, 2, 5, false, 250};
}}
feed('<Down><CR>')
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*4
{12:[No Name] [+] }|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*7
{12:[No Name] [+] }{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be ^clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
|
## grid 4
@@ -2546,40 +1243,23 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
- eq('clicked', funcs.getreg('"'))
+ eq('clicked', fn.getreg('"'))
- funcs.setreg('"', '')
- meths.input_mouse('left', 'press', '2', 4, 0, 64)
+ fn.setreg('"', '')
+ api.nvim_input_mouse('left', 'press', '2', 4, 0, 64)
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*4
{11:[No Name] [+] }|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*7
{12:[No Name] [+] [No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
{7:-- VISUAL --} |
## grid 4
@@ -2588,38 +1268,21 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
- meths.input_mouse('right', 'press', '', 4, 0, 64)
- meths.input_mouse('right', 'release', '', 4, 0, 64)
+ api.nvim_input_mouse('right', 'press', '', 4, 0, 64)
+ api.nvim_input_mouse('right', 'release', '', 4, 0, 64)
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*4
{11:[No Name] [+] }|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*7
{12:[No Name] [+] [No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
{7:-- VISUAL --} |
## grid 4
@@ -2628,41 +1291,24 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 6
{21: Copy }|
]], float_pos={
- [6] = {{id = -1}, "NW", 4, 1, 63, false, 250};
+ [6] = {-1, "NW", 4, 1, 63, false, 250};
}}
feed('<Down><CR>')
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*4
{11:[No Name] [+] }|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*7
{12:[No Name] [+] [No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
|
## grid 4
@@ -2671,38 +1317,23 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]]}
- eq('eiusmo', funcs.getreg('"'))
+ eq('eiusmo', fn.getreg('"'))
command('wincmd J')
screen:try_resize_grid(4, 7, 10)
screen:expect{grid=[[
## grid 1
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*5
{12:[No Name] [+] [No Name] [+] }|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
|
## grid 4
@@ -2719,35 +1350,22 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
]]}
- funcs.setreg('"', '')
- meths.input_mouse('left', 'press', '2', 4, 9, 1)
+ fn.setreg('"', '')
+ api.nvim_input_mouse('left', 'press', '2', 4, 9, 1)
screen:expect{grid=[[
## grid 1
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*5
{12:[No Name] [+] [No Name] [+] }|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
{7:-- VISUAL --} |
## grid 4
@@ -2764,34 +1382,21 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
]]}
- meths.input_mouse('right', 'press', '', 4, 9, 1)
- meths.input_mouse('right', 'release', '', 4, 9, 1)
+ api.nvim_input_mouse('right', 'press', '', 4, 9, 1)
+ api.nvim_input_mouse('right', 'release', '', 4, 9, 1)
screen:expect{grid=[[
## grid 1
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*5
{12:[No Name] [+] [No Name] [+] }|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
{7:-- VISUAL --} |
## grid 4
@@ -2808,37 +1413,24 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 6
{21: Copy }|
]], float_pos={
- [6] = {{id = -1}, "SW", 4, 9, 0, false, 250};
+ [6] = {-1, "SW", 4, 9, 0, false, 250};
}}
feed('<Down><CR>')
screen:expect{grid=[[
## grid 1
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*5
{12:[No Name] [+] [No Name] [+] }|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
|
## grid 4
@@ -2855,35 +1447,22 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
]]}
- eq('eiusmo', funcs.getreg('"'))
+ eq('eiusmo', fn.getreg('"'))
screen:try_resize_grid(4, 7, 11)
screen:expect{grid=[[
## grid 1
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*5
{12:[No Name] [+] [No Name] [+] }|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
|
## grid 4
@@ -2901,35 +1480,22 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
]]}
- funcs.setreg('"', '')
- meths.input_mouse('left', 'press', '2', 4, 9, 1)
+ fn.setreg('"', '')
+ api.nvim_input_mouse('left', 'press', '2', 4, 9, 1)
screen:expect{grid=[[
## grid 1
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*5
{12:[No Name] [+] [No Name] [+] }|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
{7:-- VISUAL --} |
## grid 4
@@ -2947,34 +1513,21 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
]]}
- meths.input_mouse('right', 'press', '', 4, 9, 1)
- meths.input_mouse('right', 'release', '', 4, 9, 1)
+ api.nvim_input_mouse('right', 'press', '', 4, 9, 1)
+ api.nvim_input_mouse('right', 'release', '', 4, 9, 1)
screen:expect{grid=[[
## grid 1
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*5
{12:[No Name] [+] [No Name] [+] }|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
{7:-- VISUAL --} |
## grid 4
@@ -2992,37 +1545,24 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 6
{21: Copy }|
]], float_pos={
- [6] = {{id = -1}, "NW", 4, 10, 0, false, 250};
+ [6] = {-1, "NW", 4, 10, 0, false, 250};
}}
feed('<Down><CR>')
screen:expect{grid=[[
## grid 1
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
- [5:------------------------------]│[2:----------------------]|
+ [5:------------------------------]│[2:----------------------]|*5
{12:[No Name] [+] [No Name] [+] }|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] [+] }|
[3:-----------------------------------------------------]|
## grid 2
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
|
## grid 4
@@ -3040,11 +1580,9 @@ describe('ext_multigrid', function()
## grid 5
some text |
to be clicked |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
]]}
- eq('eiusmo', funcs.getreg('"'))
+ eq('eiusmo', fn.getreg('"'))
end)
it('supports mouse drag with mouse=a', function()
@@ -3055,54 +1593,29 @@ describe('ext_multigrid', function()
command('enew')
feed('ifoo\nbar<esc>')
- meths.input_mouse('left', 'press', '', 5, 0, 0)
+ api.nvim_input_mouse('left', 'press', '', 5, 0, 0)
poke_eventloop()
- meths.input_mouse('left', 'drag', '', 5, 1, 2)
+ api.nvim_input_mouse('left', 'drag', '', 5, 1, 2)
screen:expect{grid=[[
## grid 1
- [4:--------------------------]│[5:--------------------------]|
- [4:--------------------------]│[5:--------------------------]|
- [4:--------------------------]│[5:--------------------------]|
- [4:--------------------------]│[5:--------------------------]|
- [4:--------------------------]│[5:--------------------------]|
- [4:--------------------------]│[5:--------------------------]|
+ [4:--------------------------]│[5:--------------------------]|*6
[4:--------------------------]│{11:[No Name] [+] }|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
- [4:--------------------------]│[2:--------------------------]|
+ [4:--------------------------]│[2:--------------------------]|*5
{12:[No Name] [No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
{7:-- VISUAL --} |
## grid 4
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*11
## grid 5
{20:foo} |
{20:ba}^r |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
]]}
end)
@@ -3110,25 +1623,16 @@ describe('ext_multigrid', function()
screen:try_resize(48, 8)
screen:expect{grid=[[
## grid 1
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
+ [2:------------------------------------------------]|*6
{11:[No Name] }|
[3:------------------------------------------------]|
## grid 2
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
|
]], win_viewport={
- [2] = {win = { id = 1000 }, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}
+ [2] = {win = 1000, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}
}}
insert([[
Lorem ipsum dolor sit amet, consectetur
@@ -3145,12 +1649,7 @@ describe('ext_multigrid', function()
screen:expect{grid=[[
## grid 1
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
+ [2:------------------------------------------------]|*6
{11:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3163,19 +1662,14 @@ describe('ext_multigrid', function()
## grid 3
|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 5, botline = 11, curline = 10, curcol = 7, linecount = 11, sum_scroll_delta = 5},
+ [2] = {win = 1000, topline = 5, botline = 11, curline = 10, curcol = 7, linecount = 11, sum_scroll_delta = 5},
}}
feed('<c-u>')
screen:expect{grid=[[
## grid 1
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
+ [2:------------------------------------------------]|*6
{11:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3188,18 +1682,15 @@ describe('ext_multigrid', function()
## grid 3
|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 2, botline = 9, curline = 7, curcol = 0, linecount = 11, sum_scroll_delta = 2},
+ [2] = {win = 1000, topline = 2, botline = 9, curline = 7, curcol = 0, linecount = 11, sum_scroll_delta = 2},
}}
command("split")
screen:expect{grid=[[
## grid 1
- [4:------------------------------------------------]|
- [4:------------------------------------------------]|
- [4:------------------------------------------------]|
+ [4:------------------------------------------------]|*3
{11:[No Name] [+] }|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
+ [2:------------------------------------------------]|*2
{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3212,19 +1703,16 @@ describe('ext_multigrid', function()
reprehenderit in voluptate velit esse cillum |
^dolore eu fugiat nulla pariatur. Excepteur sint |
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 6, botline = 9, curline = 7, curcol = 0, linecount = 11, sum_scroll_delta = 6},
- [4] = {win = {id = 1001}, topline = 5, botline = 9, curline = 7, curcol = 0, linecount = 11, sum_scroll_delta = 5},
+ [2] = {win = 1000, topline = 6, botline = 9, curline = 7, curcol = 0, linecount = 11, sum_scroll_delta = 6},
+ [4] = {win = 1001, topline = 5, botline = 9, curline = 7, curcol = 0, linecount = 11, sum_scroll_delta = 5},
}}
feed("b")
screen:expect{grid=[[
## grid 1
- [4:------------------------------------------------]|
- [4:------------------------------------------------]|
- [4:------------------------------------------------]|
+ [4:------------------------------------------------]|*3
{11:[No Name] [+] }|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
+ [2:------------------------------------------------]|*2
{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3237,19 +1725,16 @@ describe('ext_multigrid', function()
reprehenderit in voluptate velit esse ^cillum |
dolore eu fugiat nulla pariatur. Excepteur sint |
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 6, botline = 9, curline = 7, curcol = 0, linecount = 11, sum_scroll_delta = 6},
- [4] = {win = {id = 1001}, topline = 5, botline = 9, curline = 6, curcol = 38, linecount = 11, sum_scroll_delta = 5},
+ [2] = {win = 1000, topline = 6, botline = 9, curline = 7, curcol = 0, linecount = 11, sum_scroll_delta = 6},
+ [4] = {win = 1001, topline = 5, botline = 9, curline = 6, curcol = 38, linecount = 11, sum_scroll_delta = 5},
}}
feed("2k")
screen:expect{grid=[[
## grid 1
- [4:------------------------------------------------]|
- [4:------------------------------------------------]|
- [4:------------------------------------------------]|
+ [4:------------------------------------------------]|*3
{11:[No Name] [+] }|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
+ [2:------------------------------------------------]|*2
{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3262,20 +1747,17 @@ describe('ext_multigrid', function()
ea commodo consequat. Duis aute irure dolor in |
reprehenderit in voluptate velit esse cillum |
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 6, botline = 9, curline = 7, curcol = 0, linecount = 11, sum_scroll_delta = 6},
- [4] = {win = {id = 1001}, topline = 4, botline = 8, curline = 4, curcol = 38, linecount = 11, sum_scroll_delta = 4},
+ [2] = {win = 1000, topline = 6, botline = 9, curline = 7, curcol = 0, linecount = 11, sum_scroll_delta = 6},
+ [4] = {win = 1001, topline = 4, botline = 8, curline = 4, curcol = 38, linecount = 11, sum_scroll_delta = 4},
}}
-- handles non-current window
- meths.win_set_cursor(1000, {1, 10})
+ api.nvim_win_set_cursor(1000, {1, 10})
screen:expect{grid=[[
## grid 1
- [4:------------------------------------------------]|
- [4:------------------------------------------------]|
- [4:------------------------------------------------]|
+ [4:------------------------------------------------]|*3
{11:[No Name] [+] }|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
+ [2:------------------------------------------------]|*2
{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3288,20 +1770,17 @@ describe('ext_multigrid', function()
ea commodo consequat. Duis aute irure dolor in |
reprehenderit in voluptate velit esse cillum |
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 3, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0},
- [4] = {win = {id = 1001}, topline = 4, botline = 8, curline = 4, curcol = 38, linecount = 11, sum_scroll_delta = 4},
+ [2] = {win = 1000, topline = 0, botline = 3, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0},
+ [4] = {win = 1001, topline = 4, botline = 8, curline = 4, curcol = 38, linecount = 11, sum_scroll_delta = 4},
}}
-- sum_scroll_delta works with folds
feed('zfj')
screen:expect{grid=[[
## grid 1
- [4:------------------------------------------------]|
- [4:------------------------------------------------]|
- [4:------------------------------------------------]|
+ [4:------------------------------------------------]|*3
{11:[No Name] [+] }|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
+ [2:------------------------------------------------]|*2
{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3314,19 +1793,16 @@ describe('ext_multigrid', function()
reprehenderit in voluptate velit esse cillum |
dolore eu fugiat nulla pariatur. Excepteur sint |
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 3, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0},
- [4] = {win = {id = 1001}, topline = 4, botline = 9, curline = 4, curcol = 38, linecount = 11, sum_scroll_delta = 4},
+ [2] = {win = 1000, topline = 0, botline = 3, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0},
+ [4] = {win = 1001, topline = 4, botline = 9, curline = 4, curcol = 38, linecount = 11, sum_scroll_delta = 4},
}}
feed('<c-e>')
screen:expect{grid=[[
## grid 1
- [4:------------------------------------------------]|
- [4:------------------------------------------------]|
- [4:------------------------------------------------]|
+ [4:------------------------------------------------]|*3
{11:[No Name] [+] }|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
+ [2:------------------------------------------------]|*2
{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3339,19 +1815,14 @@ describe('ext_multigrid', function()
dolore eu fugiat nulla pariatur. Excepteur sint |
occaecat cupidatat non proident, sunt in culpa |
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 3, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0},
- [4] = {win = {id = 1001}, topline = 6, botline = 10, curline = 6, curcol = 0, linecount = 11, sum_scroll_delta = 5},
+ [2] = {win = 1000, topline = 0, botline = 3, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0},
+ [4] = {win = 1001, topline = 6, botline = 10, curline = 6, curcol = 0, linecount = 11, sum_scroll_delta = 5},
}}
command('close | 21vsplit | setlocal number smoothscroll')
screen:expect{grid=[[
## grid 1
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
+ [5:---------------------]│[2:--------------------------]|*6
{11:[No Name] [+] }{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3371,19 +1842,14 @@ describe('ext_multigrid', function()
{19: } sed do eiusmod t|
{19: }empor |
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
- [5] = {win = {id = 1002}, topline = 0, botline = 3, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
+ [2] = {win = 1000, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
+ [5] = {win = 1002, topline = 0, botline = 3, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
}}
feed('5<C-E>')
screen:expect{grid=[[
## grid 1
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
+ [5:---------------------]│[2:--------------------------]|*6
{11:[No Name] [+] }{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3403,19 +1869,14 @@ describe('ext_multigrid', function()
{19: 4 }Ut enim ad minim |
{19: }veniam, quis n{1:@@@}|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
- [5] = {win = {id = 1002}, topline = 1, botline = 4, curline = 1, curcol = 38, linecount = 11, sum_scroll_delta = 5};
+ [2] = {win = 1000, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
+ [5] = {win = 1002, topline = 1, botline = 4, curline = 1, curcol = 38, linecount = 11, sum_scroll_delta = 5};
}}
feed('<C-Y>')
screen:expect{grid=[[
## grid 1
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
+ [5:---------------------]│[2:--------------------------]|*6
{11:[No Name] [+] }{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3435,19 +1896,14 @@ describe('ext_multigrid', function()
{19: }na aliqua. |
{19: 4 }Ut enim ad min{1:@@@}|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
- [5] = {win = {id = 1002}, topline = 1, botline = 4, curline = 1, curcol = 38, linecount = 11, sum_scroll_delta = 4};
+ [2] = {win = 1000, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
+ [5] = {win = 1002, topline = 1, botline = 4, curline = 1, curcol = 38, linecount = 11, sum_scroll_delta = 4};
}}
command('set cpoptions+=n')
screen:expect{grid=[[
## grid 1
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
+ [5:---------------------]│[2:--------------------------]|*6
{11:[No Name] [+] }{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3467,19 +1923,14 @@ describe('ext_multigrid', function()
liqua. |
{19: 4 }Ut enim ad min{1:@@@}|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
- [5] = {win = {id = 1002}, topline = 1, botline = 4, curline = 1, curcol = 38, linecount = 11, sum_scroll_delta = 4};
+ [2] = {win = 1000, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
+ [5] = {win = 1002, topline = 1, botline = 4, curline = 1, curcol = 38, linecount = 11, sum_scroll_delta = 4};
}}
feed('4<C-E>')
screen:expect{grid=[[
## grid 1
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
+ [5:---------------------]│[2:--------------------------]|*6
{11:[No Name] [+] }{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3499,19 +1950,14 @@ describe('ext_multigrid', function()
mco laboris nisi ut a|
liquip ex |
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
- [5] = {win = {id = 1002}, topline = 2, botline = 6, curline = 2, curcol = 43, linecount = 11, sum_scroll_delta = 8};
+ [2] = {win = 1000, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
+ [5] = {win = 1002, topline = 2, botline = 6, curline = 2, curcol = 43, linecount = 11, sum_scroll_delta = 8};
}}
feed('2<C-Y>')
screen:expect{grid=[[
## grid 1
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
+ [5:---------------------]│[2:--------------------------]|*6
{11:[No Name] [+] }{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3531,19 +1977,14 @@ describe('ext_multigrid', function()
veniam, quis nostrud |
{19: 5 }exercitation u{1:@@@}|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
- [5] = {win = {id = 1002}, topline = 2, botline = 5, curline = 2, curcol = 43, linecount = 11, sum_scroll_delta = 6};
+ [2] = {win = 1000, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
+ [5] = {win = 1002, topline = 2, botline = 5, curline = 2, curcol = 43, linecount = 11, sum_scroll_delta = 6};
}}
command('setlocal numberwidth=12')
screen:expect{grid=[[
## grid 1
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
+ [5:---------------------]│[2:--------------------------]|*6
{11:[No Name] [+] }{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3563,19 +2004,14 @@ describe('ext_multigrid', function()
d minim veniam, quis |
nostrud |
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
- [5] = {win = {id = 1002}, topline = 2, botline = 5, curline = 2, curcol = 43, linecount = 11, sum_scroll_delta = 6};
+ [2] = {win = 1000, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
+ [5] = {win = 1002, topline = 2, botline = 5, curline = 2, curcol = 43, linecount = 11, sum_scroll_delta = 6};
}}
feed('2<C-E>')
screen:expect{grid=[[
## grid 1
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
+ [5:---------------------]│[2:--------------------------]|*6
{11:[No Name] [+] }{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3595,19 +2031,14 @@ describe('ext_multigrid', function()
{19: 5 }exercitat|
ion ullamco labori{1:@@@}|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
- [5] = {win = {id = 1002}, topline = 2, botline = 5, curline = 2, curcol = 43, linecount = 11, sum_scroll_delta = 8};
+ [2] = {win = 1000, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
+ [5] = {win = 1002, topline = 2, botline = 5, curline = 2, curcol = 43, linecount = 11, sum_scroll_delta = 8};
}}
feed('<C-E>')
screen:expect{grid=[[
## grid 1
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
- [5:---------------------]│[2:--------------------------]|
+ [5:---------------------]│[2:--------------------------]|*6
{11:[No Name] [+] }{12:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3627,8 +2058,8 @@ describe('ext_multigrid', function()
ion ullamco laboris n|
isi ut aliquip ex |
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
- [5] = {win = {id = 1002}, topline = 3, botline = 6, curline = 3, curcol = 36, linecount = 11, sum_scroll_delta = 9};
+ [2] = {win = 1000, topline = 0, botline = 4, curline = 0, curcol = 10, linecount = 11, sum_scroll_delta = 0};
+ [5] = {win = 1002, topline = 3, botline = 6, curline = 3, curcol = 36, linecount = 11, sum_scroll_delta = 9};
}}
end)
@@ -3637,18 +2068,7 @@ describe('ext_multigrid', function()
command('edit test/functional/fixtures/bigfile.txt')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:test/functional/fixtures/bigfile.txt }|
[3:-----------------------------------------------------]|
## grid 2
@@ -3667,23 +2087,12 @@ describe('ext_multigrid', function()
## grid 3
|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 13, curline = 0, curcol = 0, linecount = 30592, sum_scroll_delta = 0};
+ [2] = {win = 1000, topline = 0, botline = 13, curline = 0, curcol = 0, linecount = 30592, sum_scroll_delta = 0};
}}
feed('G')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:test/functional/fixtures/bigfile.txt }|
[3:-----------------------------------------------------]|
## grid 2
@@ -3702,23 +2111,12 @@ describe('ext_multigrid', function()
## grid 3
|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 30580, botline = 30592, curline = 30591, curcol = 0, linecount = 30592, sum_scroll_delta = 30580};
+ [2] = {win = 1000, topline = 30580, botline = 30592, curline = 30591, curcol = 0, linecount = 30592, sum_scroll_delta = 30580};
}}
feed('gg')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:test/functional/fixtures/bigfile.txt }|
[3:-----------------------------------------------------]|
## grid 2
@@ -3737,23 +2135,12 @@ describe('ext_multigrid', function()
## grid 3
|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 13, curline = 0, curcol = 0, linecount = 30592, sum_scroll_delta = 0};
+ [2] = {win = 1000, topline = 0, botline = 13, curline = 0, curcol = 0, linecount = 30592, sum_scroll_delta = 0};
}}
command('setlocal wrap')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:test/functional/fixtures/bigfile.txt }|
[3:-----------------------------------------------------]|
## grid 2
@@ -3772,23 +2159,12 @@ describe('ext_multigrid', function()
## grid 3
|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 10, curline = 0, curcol = 0, linecount = 30592, sum_scroll_delta = 0};
+ [2] = {win = 1000, topline = 0, botline = 10, curline = 0, curcol = 0, linecount = 30592, sum_scroll_delta = 0};
}}
feed('G')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:test/functional/fixtures/bigfile.txt }|
[3:-----------------------------------------------------]|
## grid 2
@@ -3807,23 +2183,12 @@ describe('ext_multigrid', function()
## grid 3
|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 30586, botline = 30592, curline = 30591, curcol = 0, linecount = 30592, sum_scroll_delta = 30588};
+ [2] = {win = 1000, topline = 30586, botline = 30592, curline = 30591, curcol = 0, linecount = 30592, sum_scroll_delta = 30588};
}}
feed('gg')
screen:expect{grid=[[
## grid 1
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*12
{11:test/functional/fixtures/bigfile.txt }|
[3:-----------------------------------------------------]|
## grid 2
@@ -3842,7 +2207,7 @@ describe('ext_multigrid', function()
## grid 3
|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 10, curline = 0, curcol = 0, linecount = 30592, sum_scroll_delta = 0};
+ [2] = {win = 1000, topline = 0, botline = 10, curline = 0, curcol = 0, linecount = 30592, sum_scroll_delta = 0};
}}
end)
@@ -3850,25 +2215,16 @@ describe('ext_multigrid', function()
screen:try_resize(48, 8)
screen:expect{grid=[[
## grid 1
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
+ [2:------------------------------------------------]|*6
{11:[No Name] }|
[3:------------------------------------------------]|
## grid 2
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
|
]], win_viewport={
- [2] = {win = { id = 1000 }, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}
+ [2] = {win = 1000, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}
}}
insert([[
Lorem ipsum dolor sit amet, consectetur
@@ -3885,12 +2241,7 @@ describe('ext_multigrid', function()
screen:expect{grid=[[
## grid 1
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
+ [2:------------------------------------------------]|*6
{11:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3903,21 +2254,16 @@ describe('ext_multigrid', function()
## grid 3
|
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 5, botline = 11, curline = 10, curcol = 7, linecount = 11, sum_scroll_delta = 5},
+ [2] = {win = 1000, topline = 5, botline = 11, curline = 10, curcol = 7, linecount = 11, sum_scroll_delta = 5},
}}
- meths.input_mouse('left', 'press', '', 1,5, 1)
+ api.nvim_input_mouse('left', 'press', '', 1,5, 1)
poke_eventloop()
- meths.input_mouse('left', 'drag', '', 1, 6, 1)
+ api.nvim_input_mouse('left', 'drag', '', 1, 6, 1)
screen:expect{grid=[[
## grid 1
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
- [2:------------------------------------------------]|
+ [2:------------------------------------------------]|*6
{11:[No Name] [+] }|
[3:------------------------------------------------]|
## grid 2
@@ -3930,7 +2276,7 @@ describe('ext_multigrid', function()
## grid 3
{7:-- VISUAL --} |
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 6, botline = 12, curline = 10, curcol = 1, linecount = 11, sum_scroll_delta = 6},
+ [2] = {win = 1000, topline = 6, botline = 12, curline = 10, curcol = 1, linecount = 11, sum_scroll_delta = 6},
}}
end)
@@ -3938,38 +2284,22 @@ describe('ext_multigrid', function()
command('split')
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
|
## grid 4
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
- [4] = {win = {id = 1001}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
+ [2] = {win = 1000, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
+ [4] = {win = 1001, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
}}
-- XXX: hack to get notifications. Could use next_msg() also.
@@ -3983,256 +2313,155 @@ describe('ext_multigrid', function()
command('setlocal winbar=very%=bar')
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
|
## grid 4
{7:very bar}|
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
- [4] = {win = {id = 1001}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
+ [2] = {win = 1000, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
+ [4] = {win = 1001, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
}}
eq({}, win_pos)
command('setlocal winbar=')
screen:expect{grid=[[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
## grid 3
|
## grid 4
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]], win_viewport={
- [2] = {win = {id = 1000}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
- [4] = {win = {id = 1001}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
+ [2] = {win = 1000, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
+ [4] = {win = 1001, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
}}
eq({}, win_pos)
end)
it('with winbar dragging statusline with mouse works correctly', function()
- meths.set_option_value('winbar', 'Set Up The Bars', {})
+ api.nvim_set_option_value('winbar', 'Set Up The Bars', {})
command('split')
screen:expect([[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*6
{11:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
{7:Set Up The Bars }|
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
|
## grid 4
{7:Set Up The Bars }|
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*4
]])
- meths.input_mouse('left', 'press', '', 1, 6, 20)
+ api.nvim_input_mouse('left', 'press', '', 1, 6, 20)
poke_eventloop()
- meths.input_mouse('left', 'drag', '', 1, 7, 20)
+ api.nvim_input_mouse('left', 'drag', '', 1, 7, 20)
screen:expect([[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*7
{11:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*4
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
{7:Set Up The Bars }|
|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*2
## grid 3
|
## grid 4
{7:Set Up The Bars }|
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
]])
- meths.input_mouse('left', 'drag', '', 1, 4, 20)
+ api.nvim_input_mouse('left', 'drag', '', 1, 4, 20)
screen:expect([[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*4
{11:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*7
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
{7:Set Up The Bars }|
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
|
## grid 4
{7:Set Up The Bars }|
^ |
- {1:~ }|
- {1:~ }|
+ {1:~ }|*2
]])
- meths.input_mouse('left', 'press', '', 1, 12, 10)
+ api.nvim_input_mouse('left', 'press', '', 1, 12, 10)
poke_eventloop()
- meths.input_mouse('left', 'drag', '', 1, 10, 10)
+ api.nvim_input_mouse('left', 'drag', '', 1, 10, 10)
screen:expect([[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*4
{11:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*5
{12:[No Name] }|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
- [3:-----------------------------------------------------]|
+ [3:-----------------------------------------------------]|*3
## grid 2
{7:Set Up The Bars }|
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
## grid 3
- |
- |
- |
+ |*3
## grid 4
{7:Set Up The Bars }|
^ |
- {1:~ }|
- {1:~ }|
+ {1:~ }|*2
]])
- eq(3, meths.get_option_value('cmdheight', {}))
+ eq(3, api.nvim_get_option_value('cmdheight', {}))
- meths.input_mouse('left', 'drag', '', 1, 12, 10)
+ api.nvim_input_mouse('left', 'drag', '', 1, 12, 10)
screen:expect([[
## grid 1
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
- [4:-----------------------------------------------------]|
+ [4:-----------------------------------------------------]|*4
{11:[No Name] }|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
- [2:-----------------------------------------------------]|
+ [2:-----------------------------------------------------]|*7
{12:[No Name] }|
[3:-----------------------------------------------------]|
## grid 2
{7:Set Up The Bars }|
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
## grid 3
|
## grid 4
{7:Set Up The Bars }|
^ |
- {1:~ }|
- {1:~ }|
+ {1:~ }|*2
]])
- eq(1, meths.get_option_value('cmdheight', {}))
+ eq(1, api.nvim_get_option_value('cmdheight', {}))
end)
end)