diff options
| author | Lewis Russell <lewis6991@gmail.com> | 2024-01-16 13:26:21 +0000 |
|---|---|---|
| committer | Lewis Russell <me@lewisr.dev> | 2024-01-16 19:11:49 +0000 |
| commit | 8f02ae82e203920b472d17e75a61763f3a409a7b (patch) | |
| tree | 4e6379218c7d53d1ba512a2464ec0237365a7bbb /test/functional/ui | |
| parent | 91dc04a5e12a3d0c5be56768ded5971bc80e6f8e (diff) | |
| download | rneovim-8f02ae82e203920b472d17e75a61763f3a409a7b.tar.gz rneovim-8f02ae82e203920b472d17e75a61763f3a409a7b.tar.bz2 rneovim-8f02ae82e203920b472d17e75a61763f3a409a7b.zip | |
test: use integers for API Buffer/Window/Tabpage EXT types
Diffstat (limited to 'test/functional/ui')
| -rw-r--r-- | test/functional/ui/cmdline_spec.lua | 4 | ||||
| -rw-r--r-- | test/functional/ui/float_spec.lua | 762 | ||||
| -rw-r--r-- | test/functional/ui/fold_spec.lua | 34 | ||||
| -rw-r--r-- | test/functional/ui/mouse_spec.lua | 6 | ||||
| -rw-r--r-- | test/functional/ui/multigrid_spec.lua | 128 | ||||
| -rw-r--r-- | test/functional/ui/popupmenu_spec.lua | 74 | ||||
| -rw-r--r-- | test/functional/ui/screen.lua | 8 | ||||
| -rw-r--r-- | test/functional/ui/searchhl_spec.lua | 4 | ||||
| -rw-r--r-- | test/functional/ui/statusline_spec.lua | 2 | ||||
| -rw-r--r-- | test/functional/ui/tabline_spec.lua | 18 | ||||
| -rw-r--r-- | test/functional/ui/title_spec.lua | 4 | ||||
| -rw-r--r-- | test/functional/ui/winbar_spec.lua | 4 |
12 files changed, 522 insertions, 526 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua index 40221269a8..9aee2ee103 100644 --- a/test/functional/ui/cmdline_spec.lua +++ b/test/functional/ui/cmdline_spec.lua @@ -1543,7 +1543,7 @@ describe('cmdheight=0', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 0, botline = 2, curline = 0, @@ -1568,7 +1568,7 @@ describe('cmdheight=0', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 0, botline = 2, curline = 0, diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index d08e346fc2..b05e7aceda 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -47,8 +47,8 @@ describe('float window', function() local win = api.nvim_open_win(buf, false, {relative='win', width=16, height=1, row=0, col=10}) local line = fn.win_execute(win, 'echo getline(1)') eq('\nthe floatwin', line) - eq('\n1', fn.win_execute(win, 'echo line(".",'..win.id..')')) - eq('\n3', fn.win_execute(win, 'echo line("$",'..win.id..')')) + eq('\n1', fn.win_execute(win, 'echo line(".",'..win..')')) + eq('\n3', fn.win_execute(win, 'echo line("$",'..win..')')) eq('\n0', fn.win_execute(win, 'echo line("$", 123456)')) fn.win_execute(win, 'bwipe!') end) @@ -480,7 +480,7 @@ describe('float window', function() it('no crash with bufpos and non-existent window', function() command('new') - local closed_win = api.nvim_get_current_win().id + local closed_win = api.nvim_get_current_win() command('close') local buf = api.nvim_create_buf(false,false) api.nvim_open_win(buf, true, {relative='win', win=closed_win, width=1, height=1, bufpos={0,0}}) @@ -490,7 +490,7 @@ describe('float window', function() it("no segfault when setting minimal style after clearing local 'fillchars' #19510", function() local float_opts = {relative = 'editor', row = 1, col = 1, width = 1, height = 1} local float_win = api.nvim_open_win(0, true, float_opts) - api.nvim_set_option_value('fillchars', NIL, {win=float_win.id}) + api.nvim_set_option_value('fillchars', NIL, {win=float_win}) float_opts.style = 'minimal' api.nvim_win_set_config(float_win, float_opts) assert_alive() @@ -519,7 +519,7 @@ describe('float window', function() api.nvim_set_option_value('splitkeep', 'screen', {}) local float_opts = {relative = 'editor', row = 1, col = 1, width = 10, height = 10} local float_win = api.nvim_open_win(0, true, float_opts) - eq(5, api.nvim_get_option_value('scroll', {win=float_win.id})) + eq(5, api.nvim_get_option_value('scroll', {win=float_win})) end) it(':unhide works when there are floating windows', function() @@ -548,8 +548,8 @@ describe('float window', function() local old_buf, old_win before_each(function() insert('foo') - old_buf = curbuf().id - old_win = curwin().id + old_buf = curbuf() + old_win = curwin() end) describe('closing the last non-floating window gives E444', function() before_each(function() @@ -569,10 +569,10 @@ describe('float window', function() describe('leaves one window with an empty buffer when there is only one buffer', function() local same_buf_float before_each(function() - same_buf_float = api.nvim_open_win(old_buf, false, float_opts).id + same_buf_float = api.nvim_open_win(old_buf, false, float_opts) end) after_each(function() - eq(old_win, curwin().id) + eq(old_win, curwin()) expect('') eq(1, #api.nvim_list_wins()) end) @@ -591,20 +591,20 @@ describe('float window', function() describe('closes other windows with that buffer when there are other buffers', function() local same_buf_float, other_buf, other_buf_float before_each(function() - same_buf_float = api.nvim_open_win(old_buf, false, float_opts).id - other_buf = api.nvim_create_buf(true, false).id - other_buf_float = api.nvim_open_win(other_buf, true, float_opts).id + same_buf_float = api.nvim_open_win(old_buf, false, float_opts) + other_buf = api.nvim_create_buf(true, false) + other_buf_float = api.nvim_open_win(other_buf, true, float_opts) insert('bar') api.nvim_set_current_win(old_win) end) after_each(function() - eq(other_buf, curbuf().id) + eq(other_buf, curbuf()) expect('bar') eq(2, #api.nvim_list_wins()) end) it('if called from non-floating window', function() api.nvim_buf_delete(old_buf, {force = true}) - eq(old_win, curwin().id) + eq(old_win, curwin()) end) it('if called from floating window with the same buffer', function() api.nvim_set_current_win(same_buf_float) @@ -613,7 +613,7 @@ describe('float window', function() api.nvim_buf_delete(old_buf, {force = true}) eq(same_buf_float, eval('g:win_leave')) eq(old_win, eval('g:win_enter')) - eq(old_win, curwin().id) + eq(old_win, curwin()) end) -- TODO: this case is too hard to deal with pending('if called from floating window with another buffer', function() @@ -624,9 +624,9 @@ describe('float window', function() describe('creates an empty buffer when there is only one listed buffer', function() local same_buf_float, unlisted_buf_float before_each(function() - same_buf_float = api.nvim_open_win(old_buf, false, float_opts).id - local unlisted_buf = api.nvim_create_buf(true, false).id - unlisted_buf_float = api.nvim_open_win(unlisted_buf, true, float_opts).id + same_buf_float = api.nvim_open_win(old_buf, false, float_opts) + local unlisted_buf = api.nvim_create_buf(true, false) + unlisted_buf_float = api.nvim_open_win(unlisted_buf, true, float_opts) insert('unlisted') command('set nobuflisted') api.nvim_set_current_win(old_win) @@ -637,7 +637,7 @@ describe('float window', function() end) it('if called from non-floating window', function() api.nvim_buf_delete(old_buf, {force = true}) - eq(old_win, curwin().id) + eq(old_win, curwin()) end) it('if called from floating window with the same buffer', function() api.nvim_set_current_win(same_buf_float) @@ -646,7 +646,7 @@ describe('float window', function() api.nvim_buf_delete(old_buf, {force = true}) eq(same_buf_float, eval('g:win_leave')) eq(old_win, eval('g:win_enter')) - eq(old_win, curwin().id) + eq(old_win, curwin()) end) -- TODO: this case is too hard to deal with pending('if called from floating window with an unlisted buffer', function() @@ -663,7 +663,7 @@ describe('float window', function() insert('unlisted') command('set nobuflisted') api.nvim_set_current_win(old_win) - same_buf_float = api.nvim_open_win(old_buf, false, float_opts).id + same_buf_float = api.nvim_open_win(old_buf, false, float_opts) end) after_each(function() expect('') @@ -671,12 +671,12 @@ describe('float window', function() end) it('if called from non-floating window with the deleted buffer', function() api.nvim_buf_delete(old_buf, {force = true}) - eq(old_win, curwin().id) + eq(old_win, curwin()) end) it('if called from floating window with the deleted buffer', function() api.nvim_set_current_win(same_buf_float) api.nvim_buf_delete(old_buf, {force = true}) - eq(same_buf_float, curwin().id) + eq(same_buf_float, curwin()) end) end) end) @@ -688,17 +688,17 @@ describe('float window', function() before_each(function() insert('unlisted') command('set nobuflisted') - unlisted_buf = curbuf().id + unlisted_buf = curbuf() command('tabnew') insert('foo') - old_buf = curbuf().id - old_win = curwin().id + old_buf = curbuf() + old_win = curwin() end) describe('without splits, deleting the last listed buffer creates an empty buffer', function() local same_buf_float before_each(function() api.nvim_set_current_win(old_win) - same_buf_float = api.nvim_open_win(old_buf, false, float_opts).id + same_buf_float = api.nvim_open_win(old_buf, false, float_opts) end) after_each(function() expect('') @@ -707,7 +707,7 @@ describe('float window', function() end) it('if called from non-floating window', function() api.nvim_buf_delete(old_buf, {force = true}) - eq(old_win, curwin().id) + eq(old_win, curwin()) end) it('if called from non-floating window in another tabpage', function() command('tab split') @@ -721,7 +721,7 @@ describe('float window', function() api.nvim_buf_delete(old_buf, {force = true}) eq(same_buf_float, eval('g:win_leave')) eq(old_win, eval('g:win_enter')) - eq(old_win, curwin().id) + eq(old_win, curwin()) end) end) describe('with splits, deleting the last listed buffer creates an empty buffer', function() @@ -730,7 +730,7 @@ describe('float window', function() command('botright vsplit') api.nvim_set_current_buf(unlisted_buf) api.nvim_set_current_win(old_win) - same_buf_float = api.nvim_open_win(old_buf, false, float_opts).id + same_buf_float = api.nvim_open_win(old_buf, false, float_opts) end) after_each(function() expect('') @@ -739,12 +739,12 @@ describe('float window', function() end) it('if called from non-floating window with the deleted buffer', function() api.nvim_buf_delete(old_buf, {force = true}) - eq(old_win, curwin().id) + eq(old_win, curwin()) end) it('if called from floating window with the deleted buffer', function() api.nvim_set_current_win(same_buf_float) api.nvim_buf_delete(old_buf, {force = true}) - eq(same_buf_float, curwin().id) + eq(same_buf_float, curwin()) end) end) end) @@ -753,20 +753,20 @@ describe('float window', function() local float_opts = {relative = 'editor', row = 1, col = 1, width = 1, height = 1} local old_tabpage, old_buf, old_win before_each(function() - old_tabpage = curtab().id + old_tabpage = curtab() insert('oldtab') command('tabnew') - old_buf = curbuf().id - old_win = curwin().id + old_buf = curbuf() + old_win = curwin() end) describe('closing the last non-floating window', function() describe('closes the tabpage when all floating windows are closeable', function() local same_buf_float before_each(function() - same_buf_float = api.nvim_open_win(old_buf, false, float_opts).id + same_buf_float = api.nvim_open_win(old_buf, false, float_opts) end) after_each(function() - eq(old_tabpage, curtab().id) + eq(old_tabpage, curtab()) expect('oldtab') eq(1, #api.nvim_list_tabpages()) end) @@ -782,8 +782,8 @@ describe('float window', function() local other_buf_float before_each(function() command('set nohidden') - local other_buf = api.nvim_create_buf(true, false).id - other_buf_float = api.nvim_open_win(other_buf, true, float_opts).id + local other_buf = api.nvim_create_buf(true, false) + other_buf_float = api.nvim_open_win(other_buf, true, float_opts) insert('foo') api.nvim_set_current_win(old_win) end) @@ -802,13 +802,13 @@ describe('float window', function() describe('closes the tabpage when all floating windows are closeable', function() local same_buf_float, other_buf, other_buf_float before_each(function() - same_buf_float = api.nvim_open_win(old_buf, false, float_opts).id - other_buf = api.nvim_create_buf(true, false).id - other_buf_float = api.nvim_open_win(other_buf, true, float_opts).id + same_buf_float = api.nvim_open_win(old_buf, false, float_opts) + other_buf = api.nvim_create_buf(true, false) + other_buf_float = api.nvim_open_win(other_buf, true, float_opts) api.nvim_set_current_win(old_win) end) after_each(function() - eq(old_tabpage, curtab().id) + eq(old_tabpage, curtab()) expect('oldtab') eq(1, #api.nvim_list_tabpages()) end) @@ -872,7 +872,7 @@ describe('float window', function() local buf = api.nvim_create_buf(false,false) local win = api.nvim_open_win(buf, false, {relative='editor', width=20, height=2, row=2, col=5}) local expected_pos = { - [4]={{id=1001}, 'NW', 1, 2, 5, true}, + [4]={1001, 'NW', 1, 2, 5, true}, } if multigrid then @@ -972,7 +972,7 @@ describe('float window', function() {1: }| {2:~ }| ]], float_pos={ - [5] = {{id = 1002}, "NW", 4, 2, 10, true}; + [5] = {1002, "NW", 4, 2, 10, true}; }} else screen:expect([[ @@ -1013,7 +1013,7 @@ describe('float window', function() local buf = api.nvim_create_buf(false,false) local win = api.nvim_open_win(buf, false, {relative='editor', width=20, height=2, row=2, col=5}) local expected_pos = { - [4]={{id=1001}, 'NW', 1, 2, 5, true}, + [4]={1001, 'NW', 1, 2, 5, true}, } if multigrid then @@ -1125,7 +1125,7 @@ describe('float window', function() {18: 2 }{15:y }| {18: 3 }{15: }| {16:~ }| - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 4, 10, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 4, 10, true}}} else screen:expect([[ {14: 1 }^x | @@ -1155,7 +1155,7 @@ describe('float window', function() ## grid 4 {18: 1 }{15: }| {16:~ }|*3 - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 4, 10, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 4, 10, true}}} else screen:expect([[ {14: 1 }^x | @@ -1192,7 +1192,7 @@ describe('float window', function() {15:x }| {15:y }| {15: }|*2 - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 4, 10, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 4, 10, true}}} else screen:expect{grid=[[ {19: }{20: 1 }{22:^x}{21: }| @@ -1224,7 +1224,7 @@ describe('float window', function() {19: }{15:y }| {19: }{15: }| {15: }| - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 4, 10, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 4, 10, true}}} else screen:expect([[ @@ -1255,7 +1255,7 @@ describe('float window', function() | ## grid 4 {15: }|*4 - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 4, 10, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 4, 10, true}}} else screen:expect([[ {19: }{20: 1 }{22:^x}{21: }| @@ -1292,7 +1292,7 @@ describe('float window', function() {15:x }| {15:y }| {15: }|*2 - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 4, 10, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 4, 10, true}}} else screen:expect{grid=[[ {19: }{20: 1 }{22:^x}{21: }| @@ -1324,7 +1324,7 @@ describe('float window', function() {19: }{15:y }| {19: }{15: }| {15: }| - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 4, 10, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 4, 10, true}}} else screen:expect([[ @@ -1355,7 +1355,7 @@ describe('float window', function() | ## grid 4 {15: }|*4 - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 4, 10, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 4, 10, true}}} else screen:expect([[ {19: }{20: 1 }{22:^x}{21: }| @@ -1393,7 +1393,7 @@ describe('float window', function() {15:x }| {15:y }| {15: }|*2 - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 4, 10, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 4, 10, true}}} else screen:expect{grid=[[ {20:1}{19: }{20: }{22:^x}{21: }| @@ -1428,10 +1428,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═════════╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -1462,10 +1462,10 @@ describe('float window', function() {5:│}{1: BORDAA }{5:│}| {5:└─────────┘}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -1496,10 +1496,10 @@ describe('float window', function() {5:│}{1: BORDAA }{5:│}| {5:╰─────────╯}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -1530,10 +1530,10 @@ describe('float window', function() {5: }{1: BORDAA }{5: }| {5: }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -1565,10 +1565,10 @@ describe('float window', function() {17:n̈̊}{1: BORDAA }{17:n̈̊}| {5:\}{7:ååååååååå}{5:x}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -1597,10 +1597,10 @@ describe('float window', function() {1: halloj! }| {1: BORDAA }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -1628,10 +1628,10 @@ describe('float window', function() {5:<}{1: halloj! }{5:>}| {5:<}{1: BORDAA }{5:>}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -1661,10 +1661,10 @@ describe('float window', function() {1: BORDAA }| {5:---------}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -1706,10 +1706,10 @@ describe('float window', function() {1: BORDAA }{26: }| {25: }{26: }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, win_viewport={ - [2] = {win = {id = 1000}, topline = 0, botline = 6, curline = 5, curcol = 0, linecount = 6, sum_scroll_delta = 0}; - [4] = {win = {id = 1001}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 2, sum_scroll_delta = 0}; + [2] = {win = 1000, topline = 0, botline = 6, curline = 5, curcol = 0, linecount = 6, sum_scroll_delta = 0}; + [4] = {win = 1001, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -1817,10 +1817,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═════════╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -1863,10 +1863,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═════════╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -1897,10 +1897,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═════════╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -1931,10 +1931,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═════════╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -1965,10 +1965,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═════════╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2008,10 +2008,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚}{11:Left}{5:═════╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2042,10 +2042,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═}{11:Center}{5:══╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2076,10 +2076,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚════}{11:Right}{5:╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2110,10 +2110,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═════}🦄BB{5:╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2153,10 +2153,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚════}{11:Right}{5:╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2187,10 +2187,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═}{11:Center}{5:══╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2221,10 +2221,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚}{11:Left}{5:═════╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2260,10 +2260,10 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═════}🦄{7:BB}{5:╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true } + [4] = { 1001, "NW", 1, 2, 5, true } }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2297,10 +2297,10 @@ describe('float window', function() {5:│}{2:~ }{5:│}|*6 {5:└────────────────────────────────────────┘}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 0, 0, true, 201 } + [4] = { 1001, "NW", 1, 0, 0, true, 201 } }, 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}; }} else screen:expect{grid=[[ @@ -2337,10 +2337,10 @@ describe('float window', function() {5:║}{1:^ }{5:║}| {5:╚═════════╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 0, 5, true }; + [4] = { 1001, "NW", 1, 0, 5, true }; }, 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 = 3, curline = 2, curcol = 0, linecount = 3, 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 = 3, curline = 2, curcol = 0, linecount = 3, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2377,11 +2377,11 @@ describe('float window', function() {1: abb }| {13: acc }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 0, 5, true, 50 }; - [5] = { { id = -1 }, "NW", 4, 4, 0, false, 100 }; + [4] = { 1001, "NW", 1, 0, 5, true, 50 }; + [5] = { -1, "NW", 4, 4, 0, false, 100 }; }, 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 = 3, curline = 2, curcol = 3, linecount=3, 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 = 3, curline = 2, curcol = 3, linecount=3, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2416,10 +2416,10 @@ describe('float window', function() {5:║}{1:ac^c }{5:║}| {5:╚═════════╝}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 0, 5, true }; + [4] = { 1001, "NW", 1, 0, 5, true }; }, 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 = 3, curline = 2, curcol = 2, linecount = 3, 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 = 3, curline = 2, curcol = 2, linecount = 3, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2460,11 +2460,11 @@ describe('float window', function() {1: bar }| {1: baz }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 0, 5, true }; - [5] = { { id = -1 }, "NW", 4, 4, 2, false, 250 }; + [4] = { 1001, "NW", 1, 0, 5, true }; + [5] = { -1, "NW", 4, 4, 2, false, 250 }; }, 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 = 3, curline = 2, curcol = 2, linecount = 3, 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 = 3, curline = 2, curcol = 2, linecount = 3, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2504,10 +2504,10 @@ describe('float window', function() {1:abb acc }| {2:~ }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 0, 5, true, 50}; + [4] = {1001, "NW", 1, 0, 5, true, 50}; }, 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 = 3, curline = 0, curcol = 0, linecount = 2, 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 = 3, curline = 0, curcol = 0, linecount = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2535,10 +2535,10 @@ describe('float window', function() {1:abb acc }| {2:~ }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 0, 5, true, 50}; + [4] = {1001, "NW", 1, 0, 5, true, 50}; }, 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 = 3, curline = 0, curcol = 4, linecount = 2, 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 = 3, curline = 0, curcol = 4, linecount = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2568,10 +2568,10 @@ describe('float window', function() {1:^ }| {2:~ }|*2 ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 0, 5, true, 50}; + [4] = {1001, "NW", 1, 0, 5, true, 50}; }, 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}; }} else screen:expect{grid=[[ @@ -2608,12 +2608,12 @@ describe('float window', function() {1:^ }| {2:~ }|*2 ]], float_pos={ - [5] = {{id = 1002}, "NW", 1, 0, 5, true, 50}; - [4] = {{id = 1001}, "NW", 1, 0, 0, true, 50}; + [5] = {1002, "NW", 1, 0, 5, true, 50}; + [4] = {1001, "NW", 1, 0, 0, true, 50}; }, 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}; - [5] = {win = {id = 1002}, 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}; + [5] = {win = 1002, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2641,12 +2641,12 @@ describe('float window', function() {1:^ }| {2:~ }|*2 ]], float_pos={ - [5] = {{id = 1002}, "NW", 1, 0, 5, true, 50}; - [4] = {{id = 1001}, "NW", 1, 0, 0, true, 50}; + [5] = {1002, "NW", 1, 0, 5, true, 50}; + [4] = {1001, "NW", 1, 0, 0, true, 50}; }, 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}; - [5] = {win = {id = 1002}, 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}; + [5] = {win = 1002, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2676,7 +2676,7 @@ describe('float window', function() ## grid 4 {1:x}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 2, 0, 4, false} + [4] = {1001, "NW", 2, 0, 4, false} }} else screen:expect([[ @@ -2700,7 +2700,7 @@ describe('float window', function() ## grid 4 {1:x}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 2, 0, 15, false} + [4] = {1001, "NW", 2, 0, 15, false} }} else screen:expect([[ @@ -2780,15 +2780,15 @@ describe('float window', function() ^ | {0:~ }| ]], float_pos={ - [5] = {{id = 1002}, "NW", 1, 6, 0, true, 50}; - [6] = {{id = 1003}, "NW", 1, 6, 0, true, 50}; + [5] = {1002, "NW", 1, 6, 0, true, 50}; + [6] = {1003, "NW", 1, 6, 0, true, 50}; }, 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}; - [5] = {win = {id = 1002}, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; - [6] = {win = {id = 1003}, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; - [7] = {win = {id = 1004}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; - [8] = {win = {id = 1005}, 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}; + [5] = {win = 1002, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; + [6] = {win = 1003, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; + [7] = {win = 1004, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; + [8] = {win = 1005, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2840,12 +2840,12 @@ describe('float window', function() ## grid 10 | ]], win_viewport={ - [2] = {win = {id = 1000}, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; - [4] = {win = {id = 1001}, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; - [7] = {win = {id = 1004}, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; - [8] = {win = {id = 1005}, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; - [9] = {win = {id = 1006}, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; - [10] = {win = {id = 1007}, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; + [2] = {win = 1000, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; + [4] = {win = 1001, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; + [7] = {win = 1004, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; + [8] = {win = 1005, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; + [9] = {win = 1006, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; + [10] = {win = 1007, topline = 0, botline = 1, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -2965,7 +2965,7 @@ describe('float window', function() {1: }| {2:~ }| ]], float_pos={ - [5] = {{id = 1002}, "NW", 4, 0, 10, true} + [5] = {1002, "NW", 4, 0, 10, true} }} else screen:expect([[ @@ -3004,7 +3004,7 @@ describe('float window', function() {1: }| {2:~ }| ]], float_pos={ - [5] = {{id = 1002}, "NW", 4, 1, 1, true} + [5] = {1002, "NW", 4, 1, 1, true} }} else screen:expect([[ @@ -3043,7 +3043,7 @@ describe('float window', function() {1: }| {2:~ }| ]], float_pos={ - [5] = {{id = 1002}, "SW", 4, 0, 3, true} + [5] = {1002, "SW", 4, 0, 3, true} }} else screen:expect([[ @@ -3082,7 +3082,7 @@ describe('float window', function() {1: }| {2:~ }| ]], float_pos={ - [5] = {{id = 1002}, "NW", 2, 1, 10, true} + [5] = {1002, "NW", 2, 1, 10, true} }} else screen:expect([[ @@ -3121,7 +3121,7 @@ describe('float window', function() {1: }| {2:~ }| ]], float_pos={ - [5] = {{id = 1002}, "SE", 2, 3, 39, true} + [5] = {1002, "SE", 2, 3, 39, true} }} else screen:expect([[ @@ -3160,7 +3160,7 @@ describe('float window', function() {1: }| {2:~ }| ]], float_pos={ - [5] = {{id = 1002}, "NE", 4, 0, 50, true} + [5] = {1002, "NE", 4, 0, 50, true} }, win_viewport = { [2] = { topline = 0, @@ -3169,7 +3169,7 @@ describe('float window', function() curcol = 3, linecount = 2, sum_scroll_delta = 0, - win = { id = 1000 }, + win = 1000, }, [4] = { topline = 0, @@ -3178,7 +3178,7 @@ describe('float window', function() curcol = 3, linecount = 2, sum_scroll_delta = 0, - win = { id = 1001 } + win = 1001 }, [5] = { topline = 0, @@ -3187,7 +3187,7 @@ describe('float window', function() curcol = 0, linecount = 1, sum_scroll_delta = 0, - win = { id = 1002 } + win = 1002 } }} else @@ -3272,7 +3272,7 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═════════╝}| ]], float_pos={ - [5] = {{id = 1002}, "NW", 4, 1, 14, true} + [5] = {1002, "NW", 4, 1, 14, true} }} else screen:expect([[ @@ -3315,7 +3315,7 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═════════╝}| ]], float_pos={ - [5] = {{id = 1002}, "NE", 4, 0, 14, true} + [5] = {1002, "NE", 4, 0, 14, true} }} else screen:expect([[ @@ -3358,7 +3358,7 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═════════╝}| ]], float_pos={ - [5] = {{id = 1002}, "SE", 4, 1, 14, true} + [5] = {1002, "SE", 4, 1, 14, true} }} else screen:expect([[ @@ -3401,7 +3401,7 @@ describe('float window', function() {5:║}{1: BORDAA }{5:║}| {5:╚═════════╝}| ]], float_pos={ - [5] = {{id = 1002}, "SW", 4, 0, 14, true} + [5] = {1002, "SW", 4, 0, 14, true} }} else screen:expect([[ @@ -3485,14 +3485,14 @@ describe('float window', function() ## grid 12 {1:8 }| ]], float_pos={ - [5] = {{id = 1002}, "NW", 1, 1, 10, true, 50}; - [6] = {{id = 1003}, "NW", 1, 1, 30, true, 50}; - [7] = {{id = 1004}, "NE", 5, 1, 0, true, 50}; - [8] = {{id = 1005}, "NE", 6, 1, 0, true, 50}; - [9] = {{id = 1006}, "SE", 7, 0, 0, true, 50}; - [10] = {{id = 1007}, "SE", 8, 0, 0, true, 50}; - [11] = {{id = 1008}, "SW", 9, 0, 5, true, 50}; - [12] = {{id = 1009}, "SW", 10, 0, 5, true, 50}; + [5] = {1002, "NW", 1, 1, 10, true, 50}; + [6] = {1003, "NW", 1, 1, 30, true, 50}; + [7] = {1004, "NE", 5, 1, 0, true, 50}; + [8] = {1005, "NE", 6, 1, 0, true, 50}; + [9] = {1006, "SE", 7, 0, 0, true, 50}; + [10] = {1007, "SE", 8, 0, 0, true, 50}; + [11] = {1008, "SW", 9, 0, 5, true, 50}; + [12] = {1009, "SW", 10, 0, 5, true, 50}; }} else screen:expect([[ @@ -3552,14 +3552,14 @@ describe('float window', function() ## grid 12 {1:8 }| ]], float_pos={ - [5] = {{id = 1002}, "NE", 8, 1, 0, true, 50}; - [6] = {{id = 1003}, "NE", 12, 1, 0, true, 50}; - [7] = {{id = 1004}, "SE", 5, 0, 0, true, 50}; - [8] = {{id = 1005}, "NW", 1, 1, 30, true, 50}; - [9] = {{id = 1006}, "SW", 10, 0, 5, true, 50}; - [10] = {{id = 1007}, "SE", 6, 0, 0, true, 50}; - [11] = {{id = 1008}, "SW", 7, 0, 5, true, 50}; - [12] = {{id = 1009}, "NW", 1, 1, 10, true, 50}; + [5] = {1002, "NE", 8, 1, 0, true, 50}; + [6] = {1003, "NE", 12, 1, 0, true, 50}; + [7] = {1004, "SE", 5, 0, 0, true, 50}; + [8] = {1005, "NW", 1, 1, 30, true, 50}; + [9] = {1006, "SW", 10, 0, 5, true, 50}; + [10] = {1007, "SE", 6, 0, 0, true, 50}; + [11] = {1008, "SW", 7, 0, 5, true, 50}; + [12] = {1009, "NW", 1, 1, 10, true, 50}; }} else screen:expect([[ @@ -3596,7 +3596,7 @@ describe('float window', function() it('can be placed relative text in a window', function() screen:try_resize(30,5) - local firstwin = api.nvim_get_current_win().id + local firstwin = api.nvim_get_current_win() api.nvim_buf_set_lines(0, 0, -1, true, {'just some', 'example text that is wider than the window', '', '', 'more text'}) if multigrid then screen:expect{grid=[[ @@ -3639,7 +3639,7 @@ describe('float window', function() ## grid 4 {1:some info! }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 2, 3, 2, true } + [4] = { 1001, "NW", 2, 3, 2, true } }} else screen:expect{grid=[[ @@ -3668,7 +3668,7 @@ describe('float window', function() ## grid 4 {1:some info! }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 2, 2, 2, true }, + [4] = { 1001, "NW", 2, 2, 2, true }, }} else screen:expect{grid=[[ @@ -3695,7 +3695,7 @@ describe('float window', function() ## grid 4 {1:some info! }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 2, 1, 32, true } + [4] = { 1001, "NW", 2, 1, 32, true } }} else -- note: appears misaligned due to cursor @@ -3725,7 +3725,7 @@ describe('float window', function() ## grid 4 {1:some info! }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 2, 2, 7, true } + [4] = { 1001, "NW", 2, 2, 7, true } }} else screen:expect{grid=[[ @@ -3756,7 +3756,7 @@ describe('float window', function() ## grid 4 {1:some info! }| ]], float_pos={ - [4] = { { id = 1001 }, "SW", 2, 1, 7, true } + [4] = { 1001, "SW", 2, 1, 7, true } }} else screen:expect{grid=[[ @@ -3794,7 +3794,7 @@ describe('float window', function() ^ | {0:~ }|*8 ]], float_pos={ - [4] = { { id = 1001 }, "SW", 2, 8, 0, true } + [4] = { 1001, "SW", 2, 8, 0, true } }} else screen:expect{grid=[[ @@ -3829,7 +3829,7 @@ describe('float window', function() ## grid 4 {1:some info! }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 2, 2, 5, true } + [4] = { 1001, "NW", 2, 2, 5, true } }} else screen:expect{grid=[[ @@ -3860,7 +3860,7 @@ describe('float window', function() ## grid 4 {1:some info! }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 2, 3, 7, true } + [4] = { 1001, "NW", 2, 3, 7, true } }} else screen:expect{grid=[[ @@ -3888,7 +3888,7 @@ describe('float window', function() ## grid 4 {1:some info! }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 2, 2, 0, true } + [4] = { 1001, "NW", 2, 2, 0, true } }} else screen:expect{grid=[[ @@ -3940,7 +3940,7 @@ describe('float window', function() ## grid 4 {1:some floaty text }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 3, 1, true} + [4] = {1001, "NW", 1, 3, 1, true} }} else screen:expect([[ @@ -3962,7 +3962,7 @@ describe('float window', function() local buf = api.nvim_create_buf(false,false) api.nvim_open_win(buf, true, {relative='editor', width=20, height=2, row=2, col=5}) local expected_pos = { - [2]={{id=1001}, 'NW', 1, 2, 5} + [2]={1001, 'NW', 1, 2, 5} } screen:expect{grid=[[ ## grid 1 @@ -3990,7 +3990,7 @@ describe('float window', function() api.nvim_buf_set_lines(buf, 0, -1, true, {'such', 'very', 'float'}) local win = api.nvim_open_win(buf, false, {relative='editor', width=15, height=4, row=2, col=10}) local expected_pos = { - [4]={{id=1001}, 'NW', 1, 2, 10, true}, + [4]={1001, 'NW', 1, 2, 10, true}, } if multigrid then screen:expect{grid=[[ @@ -4430,7 +4430,7 @@ describe('float window', function() it('does not crash with inccommand #9379', function() local expected_pos = { - [4]={{id=1001}, 'NW', 1, 2, 0, true}, + [4]={1001, 'NW', 1, 2, 0, true}, } command("set inccommand=split") @@ -4542,7 +4542,7 @@ describe('float window', function() describe('and completion', function() before_each(function() local buf = api.nvim_create_buf(false,false) - local win = api.nvim_open_win(buf, true, {relative='editor', width=12, height=4, row=2, col=5}).id + local win = api.nvim_open_win(buf, true, {relative='editor', width=12, height=4, row=2, col=5}) api.nvim_set_option_value('winhl', 'Normal:ErrorMsg', {win=win}) if multigrid then screen:expect{grid=[[ @@ -4558,7 +4558,7 @@ describe('float window', function() {7:^ }| {12:~ }|*3 ]], float_pos={ - [4] = {{ id = 1001 }, "NW", 1, 2, 5, true}, + [4] = {1001, "NW", 1, 2, 5, true}, }} else screen:expect([[ @@ -4592,8 +4592,8 @@ describe('float window', function() {1: word }| {1: longtext }| ]], float_pos={ - [4] = {{ id = 1001 }, "NW", 1, 2, 5, true, 50}, - [5] = {{ id = -1 }, "NW", 4, 1, 1, false, 100} + [4] = {1001, "NW", 1, 2, 5, true, 50}, + [5] = {-1, "NW", 4, 1, 1, false, 100} }} else screen:expect([[ @@ -4622,7 +4622,7 @@ describe('float window', function() {7:x a^a }| {12:~ }|*3 ]], float_pos={ - [4] = {{ id = 1001 }, "NW", 1, 2, 5, true}, + [4] = {1001, "NW", 1, 2, 5, true}, }} else @@ -4655,8 +4655,8 @@ describe('float window', function() {1:yy }| {1:zz }| ]], float_pos={ - [4] = {{ id = 1001 }, "NW", 1, 2, 5, true, 50}, - [5] = {{ id = -1 }, "NW", 2, 1, 0, false, 100} + [4] = {1001, "NW", 1, 2, 5, true, 50}, + [5] = {-1, "NW", 2, 1, 0, false, 100} }} else screen:expect([[ @@ -4684,7 +4684,7 @@ describe('float window', function() {7:x aa }| {12:~ }|*3 ]], float_pos={ - [4] = {{ id = 1001 }, "NW", 1, 2, 5, true}, + [4] = {1001, "NW", 1, 2, 5, true}, }} else screen:expect([[ @@ -4717,8 +4717,8 @@ describe('float window', function() {1: undefine }| {1: unplace }| ]], float_pos={ - [5] = {{id = -1}, "SW", 1, 6, 5, false, 250}; - [4] = {{id = 1001}, "NW", 1, 2, 5, true, 50}; + [5] = {-1, "SW", 1, 6, 5, false, 250}; + [4] = {1001, "NW", 1, 2, 5, true, 50}; }} else screen:expect{grid=[[ @@ -4752,7 +4752,7 @@ describe('float window', function() {7:x aa^ }| {12:~ }|*3 ]], float_pos={ - [4] = {{ id = 1001 }, "NW", 1, 2, 5, true}, + [4] = {1001, "NW", 1, 2, 5, true}, }, popupmenu={ anchor = {4, 0, 2}, items = items, pos = 0 }} @@ -4783,7 +4783,7 @@ describe('float window', function() {7:x a^a }| {12:~ }|*3 ]], float_pos={ - [4] = {{ id = 1001 }, "NW", 1, 2, 5, true}, + [4] = {1001, "NW", 1, 2, 5, true}, }} else screen:expect([[ @@ -4812,7 +4812,7 @@ describe('float window', function() {7:x aa }| {12:~ }|*3 ]], float_pos={ - [4] = {{ id = 1001 }, "NW", 1, 2, 5, true}, + [4] = {1001, "NW", 1, 2, 5, true}, }, popupmenu={ anchor = {2, 0, 0}, items = items, pos = 0 }} @@ -4843,7 +4843,7 @@ describe('float window', function() {7:x aa }| {12:~ }|*3 ]], float_pos={ - [4] = {{ id = 1001 }, "NW", 1, 2, 5, true}, + [4] = {1001, "NW", 1, 2, 5, true}, }} else screen:expect([[ @@ -4878,7 +4878,7 @@ describe('float window', function() {1:word }| {1:longtext }| ]], float_pos={ - [4] = {{id = -1}, "NW", 2, 1, 0, false, 100}} + [4] = {-1, "NW", 2, 1, 0, false, 100}} } else screen:expect([[ @@ -4912,8 +4912,8 @@ describe('float window', function() {15:some info }| {15:about item }| ]], float_pos={ - [4] = {{id = -1}, "NW", 2, 1, 0, false, 100}, - [5] = {{id = 1001}, "NW", 2, 1, 12, true, 50}, + [4] = {-1, "NW", 2, 1, 0, false, 100}, + [5] = {1001, "NW", 2, 1, 12, true, 50}, }} else screen:expect([[ @@ -4943,7 +4943,7 @@ describe('float window', function() {15:some info }| {15:about item }| ]], float_pos={ - [5] = {{id = 1001}, "NW", 2, 1, 12, true}, + [5] = {1001, "NW", 2, 1, 12, true}, }} else screen:expect([[ @@ -4993,7 +4993,7 @@ describe('float window', function() {1:word }| {1:longtext }| ]], float_pos={ - [4] = {{id = -1}, "NW", 2, 1, 0, false, 100}, + [4] = {-1, "NW", 2, 1, 0, false, 100}, }} else screen:expect([[ @@ -5048,10 +5048,10 @@ describe('float window', function() here | float | ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 2, 5, true, 50}; + [4] = {1001, "NW", 1, 2, 5, true, 50}; }, 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 = 2, 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 = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -5077,7 +5077,7 @@ describe('float window', function() win = api.nvim_open_win(buf, false, {relative='editor', width=20, height=2, row=2, col=5}) api.nvim_buf_set_lines(buf,0,-1,true,{"y"}) expected_pos = { - [4]={{id=1001}, 'NW', 1, 2, 5, true} + [4]={1001, 'NW', 1, 2, 5, true} } if multigrid then screen:expect{grid=[[ @@ -6174,8 +6174,8 @@ describe('float window', function() {1:^y }| {2:~ }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 2, 5, true}, - [5] = {{id = 1002}, "NW", 1, 4, 8, true} + [4] = {1001, "NW", 1, 2, 5, true}, + [5] = {1002, "NW", 1, 4, 8, true} }} else screen:expect([[ @@ -6204,7 +6204,7 @@ describe('float window', function() {1:^y }| {2:~ }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 2, 5, true}, + [4] = {1001, "NW", 1, 2, 5, true}, }} else screen:expect([[ @@ -6880,10 +6880,10 @@ describe('float window', function() {1:bar }| {1:baz }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 2, 5, true, 50}; + [4] = {1001, "NW", 1, 2, 5, true, 50}; }, 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 = 3, curline = 0, curcol = 0, linecount = 3, 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 = 3, curline = 0, curcol = 0, linecount = 3, sum_scroll_delta = 0}; }} api.nvim_input_mouse('left', 'press', '', 4, 0, 0) @@ -6901,10 +6901,10 @@ describe('float window', function() {1:bar }| {1:baz }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 2, 5, true, 50}; + [4] = {1001, "NW", 1, 2, 5, true, 50}; }, 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 = 3, curline = 0, curcol = 0, linecount = 3, 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 = 3, curline = 0, curcol = 0, linecount = 3, sum_scroll_delta = 0}; }} api.nvim_input_mouse('left', 'drag', '', 4, 1, 2) @@ -6922,10 +6922,10 @@ describe('float window', function() {27:ba}{1:^r }| {1:baz }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 2, 5, true, 50}; + [4] = {1001, "NW", 1, 2, 5, true, 50}; }, 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 = 3, curline = 1, curcol = 2, linecount = 3, 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 = 3, curline = 1, curcol = 2, linecount = 3, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -6983,10 +6983,10 @@ describe('float window', function() {5:│}{1:baz }{5:│}| {5:└────────────────────┘}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 0, 5, true, 50}; + [4] = {1001, "NW", 1, 0, 5, true, 50}; }, 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 = 3, curline = 0, curcol = 0, linecount = 3, 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 = 3, curline = 0, curcol = 0, linecount = 3, sum_scroll_delta = 0}; }} api.nvim_input_mouse('left', 'press', '', 4, 1, 1) @@ -7006,10 +7006,10 @@ describe('float window', function() {5:│}{1:baz }{5:│}| {5:└────────────────────┘}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 0, 5, true, 50}; + [4] = {1001, "NW", 1, 0, 5, true, 50}; }, 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 = 3, curline = 0, curcol = 0, linecount = 3, 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 = 3, curline = 0, curcol = 0, linecount = 3, sum_scroll_delta = 0}; }} api.nvim_input_mouse('left', 'drag', '', 4, 2, 3) @@ -7029,10 +7029,10 @@ describe('float window', function() {5:│}{1:baz }{5:│}| {5:└────────────────────┘}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 0, 5, true, 50}; + [4] = {1001, "NW", 1, 0, 5, true, 50}; }, 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 = 3, curline = 1, curcol = 2, linecount = 3, 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 = 3, curline = 1, curcol = 2, linecount = 3, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -7073,7 +7073,7 @@ describe('float window', function() local buf = api.nvim_create_buf(false,false) api.nvim_buf_set_lines(buf, 0, -1, true, {'foo', 'bar', 'baz'}) local float_win = api.nvim_open_win(buf, false, {relative='editor', width=20, height=4, row=1, col=5}) - api.nvim_set_option_value('winbar', 'floaty bar', {win=float_win.id}) + api.nvim_set_option_value('winbar', 'floaty bar', {win=float_win}) if multigrid then screen:expect{grid=[[ ## grid 1 @@ -7090,10 +7090,10 @@ describe('float window', function() {1:bar }| {1:baz }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 1, 5, true, 50}; + [4] = {1001, "NW", 1, 1, 5, true, 50}; }, 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 = 3, curline = 0, curcol = 0, linecount = 3, 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 = 3, curline = 0, curcol = 0, linecount = 3, sum_scroll_delta = 0}; }} api.nvim_input_mouse('left', 'press', '', 4, 1, 0) @@ -7112,10 +7112,10 @@ describe('float window', function() {1:bar }| {1:baz }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 1, 5, true, 50}; + [4] = {1001, "NW", 1, 1, 5, true, 50}; }, 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 = 3, curline = 0, curcol = 0, linecount = 3, 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 = 3, curline = 0, curcol = 0, linecount = 3, sum_scroll_delta = 0}; }} api.nvim_input_mouse('left', 'drag', '', 4, 2, 2) @@ -7134,10 +7134,10 @@ describe('float window', function() {27:ba}{1:^r }| {1:baz }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 1, 5, true, 50}; + [4] = {1001, "NW", 1, 1, 5, true, 50}; }, 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 = 3, curline = 1, curcol = 2, linecount = 3, 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 = 3, curline = 1, curcol = 2, linecount = 3, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -7283,10 +7283,10 @@ describe('float window', function() {5:│}{1: }{5:│}|*3 {5:└────────────────────┘}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 0, 5, true, 50}; + [4] = {1001, "NW", 1, 0, 5, true, 50}; }, 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 = 3, curline = 0, curcol = 0, linecount = 3, 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 = 3, curline = 0, curcol = 0, linecount = 3, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -7338,10 +7338,10 @@ describe('float window', function() {5:│}{2:~ }{5:│}| {5:└────────────────────┘}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 0, 5, true, 50}; + [4] = {1001, "NW", 1, 0, 5, true, 50}; }, 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 = 4, curline = 0, curcol = 0, linecount = 3, 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 = 4, curline = 0, curcol = 0, linecount = 3, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -7373,10 +7373,10 @@ describe('float window', function() {5:│}{19:│}{1: }{5:│}| {5:└────────────────────┘}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 0, 5, true, 50}; + [4] = {1001, "NW", 1, 0, 5, true, 50}; }, 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 = 3, curline = 0, curcol = 0, linecount = 3, 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 = 3, curline = 0, curcol = 0, linecount = 3, sum_scroll_delta = 0}; }} else api.nvim_input_mouse('left', 'press', '', 0, 2, 6) @@ -7477,7 +7477,7 @@ describe('float window', function() {1:test }| {1: }| {1:popup text }| - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 2, 5, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 2, 5, true}}} else screen:expect([[ Ut enim ad minim veniam, quis nostrud | @@ -7492,7 +7492,7 @@ describe('float window', function() ]]) end - api.nvim_set_option_value("winblend", 30, {win=win.id}) + api.nvim_set_option_value("winblend", 30, {win=win}) if multigrid then screen:expect{grid=[[ ## grid 1 @@ -7513,7 +7513,7 @@ describe('float window', function() {9:test }| {9: }| {9:popup text }| - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 2, 5, true}}, unchanged=true} + ]], float_pos={[4] = {1001, "NW", 1, 2, 5, true}}, unchanged=true} else screen:expect([[ Ut enim ad minim veniam, quis nostrud | @@ -7550,7 +7550,7 @@ describe('float window', function() {13:test }| {13: }| {13:popup text }| - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 2, 5, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 2, 5, true}}} else screen:expect([[ Ut enim ad minim veniam, quis nostrud | @@ -7595,7 +7595,7 @@ describe('float window', function() {9:test }| {9: }| {10:popup text}{9: }| - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 2, 5, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 2, 5, true}}} else screen:expect([[ Ut enim ad minim veniam, quis nostrud | @@ -7631,7 +7631,7 @@ describe('float window', function() {9:test }| {9: }| {11:popup text}{9: }| - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 2, 5, true}}, unchanged=true} + ]], float_pos={[4] = {1001, "NW", 1, 2, 5, true}}, unchanged=true} else screen:expect([[ Ut enim ad minim veniam, quis nostrud | @@ -7667,7 +7667,7 @@ describe('float window', function() ## grid 4 {11:popup text}{9: }| {12:~ }|*2 - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 2, 5, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 2, 5, true}}} else api.nvim_input_mouse('wheel', 'down', '', 0, 4, 7) screen:expect([[ @@ -7685,7 +7685,7 @@ describe('float window', function() -- Check that 'winblend' applies to border/title/footer api.nvim_win_set_config(win, {border='single', title='Title', footer='Footer'}) - api.nvim_set_option_value('winblend', 100, {win=win.id}) + api.nvim_set_option_value('winblend', 100, {win=win}) api.nvim_set_option_value("cursorline", true, {win=0}) command('hi clear VertSplit') feed('k0') @@ -7710,7 +7710,7 @@ describe('float window', function() {17:│}{11:popup text}{18: }{17:│}| {17:│}{19:~ }{17:│}|*2 {17:└}{23:Footer}{17:─────────┘}| - ]], float_pos={[4] = {{id = 1001}, "NW", 1, 2, 5, true}}} + ]], float_pos={[4] = {1001, "NW", 1, 2, 5, true}}} else screen:expect([[ Ut enim ad minim veniam, quis nostrud | @@ -7747,7 +7747,7 @@ describe('float window', function() ## grid 4 {1:口 }|*2 {1: }| - ]], float_pos={ [4] = { { id = 1001 }, "NW", 1, 0, 11, true } }} + ]], float_pos={ [4] = { 1001, "NW", 1, 0, 11, true } }} else screen:expect([[ # TODO: 测 {1:口 }信息的准确性 | @@ -7785,7 +7785,7 @@ describe('float window', function() -- at least. Also check invisible EndOfBuffer region blends correctly. api.nvim_buf_set_lines(buf, 0, -1, true, {" x x x xx", " x x x x"}) win = api.nvim_open_win(buf, false, {relative='editor', width=12, height=3, row=0, col=11, style='minimal'}) - api.nvim_set_option_value('winblend', 30, {win=win.id}) + api.nvim_set_option_value('winblend', 30, {win=win}) screen:set_default_attr_ids({ [1] = {foreground = tonumber('0xb282b2'), background = tonumber('0xffcfff')}, [2] = {foreground = Screen.colors.Grey0, background = tonumber('0xffcfff')}, @@ -7809,7 +7809,7 @@ describe('float window', function() {5: x x x x}| {5: }| ]], float_pos={ - [5] = { { id = 1002 }, "NW", 1, 0, 11, true } + [5] = { 1002, "NW", 1, 0, 11, true } }} else screen:expect([[ @@ -7838,7 +7838,7 @@ describe('float window', function() {5: x x x x}| {5: }| ]], float_pos={ - [5] = { { id = 1002 }, "NW", 1, 0, 12, true } + [5] = { 1002, "NW", 1, 0, 12, true } }} else screen:expect([[ @@ -7901,12 +7901,8 @@ describe('float window', function() [1] = {foreground = Screen.colors.Blue1, bold = true}; [2] = {background = Screen.colors.LightMagenta}; }, float_pos={ - [4] = { { - id = 1001 - }, "NW", 1, 1, 1, true }, - [5] = { { - id = 1002 - }, "NW", 1, 0, 0, true } + [4] = { 1001, "NW", 1, 1, 1, true }, + [5] = { 1002, "NW", 1, 0, 0, true } }} else screen:expect([[ @@ -7958,8 +7954,8 @@ describe('float window', function() [1] = {foreground = Screen.colors.Blue1, bold = true}; [2] = {background = Screen.colors.LightMagenta}; }, float_pos={ - [4] = { { id = 1001 }, "NW", 1, 1, 1, true }, - [5] = { { id = 1002 }, "NW", 1, 0, 0, true } + [4] = { 1001, "NW", 1, 1, 1, true }, + [5] = { 1002, "NW", 1, 0, 0, true } }} else screen:expect([[ @@ -7977,7 +7973,7 @@ describe('float window', function() it("correctly orders multiple opened floats (current last)", function() local buf = api.nvim_create_buf(false,false) local win = api.nvim_open_win(buf, false, {relative='editor', width=20, height=2, row=2, col=5}) - api.nvim_set_option_value("winhl", "Normal:ErrorMsg,EndOfBuffer:ErrorMsg", {win=win.id}) + api.nvim_set_option_value("winhl", "Normal:ErrorMsg,EndOfBuffer:ErrorMsg", {win=win}) if multigrid then screen:expect{grid=[[ @@ -7993,10 +7989,10 @@ describe('float window', function() {7: }| {7:~ }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true }; + [4] = { 1001, "NW", 1, 2, 5, true }; }, 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}; }} else screen:expect{grid=[[ @@ -8038,14 +8034,14 @@ describe('float window', function() {17:^ }| {17:~ }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true }; - [5] = { { id = 1002 }, "NW", 1, 3, 8, true }; - [6] = { { id = 1003 }, "NW", 1, 4, 10, true }; + [4] = { 1001, "NW", 1, 2, 5, true }; + [5] = { 1002, "NW", 1, 3, 8, true }; + [6] = { 1003, "NW", 1, 4, 10, true }; }, 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}; - [5] = {win = {id = 1002}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount=1, sum_scroll_delta = 0}; - [6] = {win = {id = 1003}, 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}; + [5] = {win = 1002, topline = 0, botline = 2, curline = 0, curcol = 0, linecount=1, sum_scroll_delta = 0}; + [6] = {win = 1003, topline = 0, botline = 2, curline = 0, curcol = 0, linecount=1, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -8063,7 +8059,7 @@ describe('float window', function() it("correctly orders multiple opened floats (non-current last)", function() local buf = api.nvim_create_buf(false,false) local win = api.nvim_open_win(buf, false, {relative='editor', width=20, height=2, row=2, col=5}) - api.nvim_set_option_value("winhl", "Normal:ErrorMsg,EndOfBuffer:ErrorMsg", {win=win.id}) + api.nvim_set_option_value("winhl", "Normal:ErrorMsg,EndOfBuffer:ErrorMsg", {win=win}) if multigrid then screen:expect{grid=[[ @@ -8079,10 +8075,10 @@ describe('float window', function() {7: }| {7:~ }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true }; + [4] = { 1001, "NW", 1, 2, 5, true }; }, 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}; }} else screen:expect{grid=[[ @@ -8124,14 +8120,14 @@ describe('float window', function() {1: }| {1:~ }| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 2, 5, true }; - [5] = { { id = 1002 }, "NW", 1, 4, 10, true }; - [6] = { { id = 1003 }, "NW", 1, 3, 8, true }; + [4] = { 1001, "NW", 1, 2, 5, true }; + [5] = { 1002, "NW", 1, 4, 10, true }; + [6] = { 1003, "NW", 1, 3, 8, true }; }, 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}; - [5] = {win = {id = 1002}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; - [6] = {win = {id = 1003}, 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}; + [5] = {win = 1002, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; + [6] = {win = 1003, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -8149,11 +8145,11 @@ describe('float window', function() it('can use z-index', function() local buf = api.nvim_create_buf(false,false) local win1 = api.nvim_open_win(buf, false, {relative='editor', width=20, height=3, row=1, col=5, zindex=30}) - api.nvim_set_option_value("winhl", "Normal:ErrorMsg,EndOfBuffer:ErrorMsg", {win=win1.id}) + api.nvim_set_option_value("winhl", "Normal:ErrorMsg,EndOfBuffer:ErrorMsg", {win=win1}) local win2 = api.nvim_open_win(buf, false, {relative='editor', width=20, height=3, row=2, col=6, zindex=50}) - api.nvim_set_option_value("winhl", "Normal:Search,EndOfBuffer:Search", {win=win2.id}) + api.nvim_set_option_value("winhl", "Normal:Search,EndOfBuffer:Search", {win=win2}) local win3 = api.nvim_open_win(buf, false, {relative='editor', width=20, height=3, row=3, col=7, zindex=40}) - api.nvim_set_option_value("winhl", "Normal:Question,EndOfBuffer:Question", {win=win3.id}) + api.nvim_set_option_value("winhl", "Normal:Question,EndOfBuffer:Question", {win=win3}) if multigrid then screen:expect{grid=[[ @@ -8175,14 +8171,14 @@ describe('float window', function() {8: }| {8:~ }|*2 ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 1, 5, true, 30}; - [5] = {{id = 1002}, "NW", 1, 2, 6, true, 50}; - [6] = {{id = 1003}, "NW", 1, 3, 7, true, 40}; + [4] = {1001, "NW", 1, 1, 5, true, 30}; + [5] = {1002, "NW", 1, 2, 6, true, 50}; + [6] = {1003, "NW", 1, 3, 7, true, 40}; }, 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}; - [5] = {win = {id = 1002}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; - [6] = {win = {id = 1003}, 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}; + [5] = {win = 1002, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; + [6] = {win = 1003, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -8200,7 +8196,7 @@ describe('float window', function() it('can use winbar', function() local buf = api.nvim_create_buf(false,false) local win1 = api.nvim_open_win(buf, false, {relative='editor', width=15, height=3, row=1, col=5}) - api.nvim_set_option_value('winbar', 'floaty bar', {win=win1.id}) + api.nvim_set_option_value('winbar', 'floaty bar', {win=win1}) if multigrid then screen:expect{grid=[[ @@ -8217,10 +8213,10 @@ describe('float window', function() {1: }| {2:~ }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 1, 5, true, 50}; + [4] = {1001, "NW", 1, 1, 5, true, 50}; }, 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}; }} else screen:expect{grid=[[ @@ -8253,10 +8249,10 @@ describe('float window', function() {5:│}{2:~ }{5:│}|*2 {5:└───────────────┘}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 0, 4, true, 50}; + [4] = {1001, "NW", 1, 0, 4, true, 50}; }, 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}; }} else screen:expect{grid=[[ @@ -8289,10 +8285,10 @@ describe('float window', function() {5:│}{1: }{5:│}|*4 {5:└────────────────────────────────────────┘}| ]], float_pos={ - [4] = {{id = 1001}, "SW", 1, 9, 0, true, 50}; + [4] = {1001, "SW", 1, 9, 0, true, 50}; }, 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}; }} else screen:expect{grid=[[ @@ -8323,10 +8319,10 @@ describe('float window', function() {5:│}{1: }{5:│}|*2 {5:└────────────────────────────────────────┘}| ]], float_pos={ - [4] = {{id = 1001}, "SW", 1, 9, 0, true, 50}; + [4] = {1001, "SW", 1, 9, 0, true, 50}; }, 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}; }} else screen:expect{grid=[[ @@ -8349,7 +8345,7 @@ describe('float window', function() {0:~ }|*8 ## 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}; }} else screen:expect{grid=[[ @@ -8379,10 +8375,10 @@ describe('float window', function() {5:│}{1: }{5:│}|*4 {5:└────────────────────────────────────────┘}| ]], float_pos={ - [4] = {{id = 1001}, "SW", 1, 8, 0, true, 50}; + [4] = {1001, "SW", 1, 8, 0, true, 50}; }, 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}; }} else screen:expect{grid=[[ @@ -8420,10 +8416,10 @@ describe('float window', function() {5:│}{1: }{5:│}|*4 {5:└────────────────────────────────────────┘}| ]], float_pos={ - [4] = {{id = 1001}, "SW", 1, 8, 0, true, 50}; + [4] = {1001, "SW", 1, 8, 0, true, 50}; }, 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}; }} else screen:expect{grid=[[ @@ -8453,10 +8449,10 @@ describe('float window', function() {5:│}{1: }{5:│}|*2 {5:└────────────────────────────────────────┘}| ]], float_pos={ - [4] = {{id = 1001}, "SW", 1, 8, 0, true, 50}; + [4] = {1001, "SW", 1, 8, 0, true, 50}; }, 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}; }} else screen:expect{grid=[[ @@ -8481,7 +8477,7 @@ describe('float window', function() ## 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}; }} else screen:expect{grid=[[ @@ -8497,7 +8493,7 @@ describe('float window', function() local float_opts = {relative = 'editor', row = 1, col = 1, width = 10, height = 10} api.nvim_open_win(api.nvim_create_buf(false, false), true, float_opts) if multigrid then - screen:expect({float_pos = {[4] = {{id = 1001}, 'NW', 1, 1, 1, true}}}) + screen:expect({float_pos = {[4] = {1001, 'NW', 1, 1, 1, true}}}) end command(cmd) exec_lua([[ @@ -8540,10 +8536,10 @@ describe('float window', function() {1:cd }| {2:~ }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 1, 1, true, 50}; + [4] = {1001, "NW", 1, 1, 1, true, 50}; }, 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 = 3, curline = 1, curcol = 1, linecount = 2, 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 = 3, curline = 1, curcol = 1, linecount = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -8572,10 +8568,10 @@ describe('float window', function() {1:c^d }| {2:~ }| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 1, 1, true, 50}; + [4] = {1001, "NW", 1, 1, 1, true, 50}; }, 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 = 3, curline = 1, curcol = 1, linecount = 2, 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 = 3, curline = 1, curcol = 1, linecount = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -8609,10 +8605,10 @@ describe('float window', function() {5:│}{2:~ }{5:│}| {5:└────┘}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 1, 1, true, 50}; + [4] = {1001, "NW", 1, 1, 1, true, 50}; }, 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 = 3, curline = 1, curcol = 1, linecount = 2, 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 = 3, curline = 1, curcol = 1, linecount = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -8644,10 +8640,10 @@ describe('float window', function() {5:│}{2:~ }{5:│}| {5:└────┘}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 1, 1, true, 50}; + [4] = {1001, "NW", 1, 1, 1, true, 50}; }, 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 = 3, curline = 1, curcol = 1, linecount = 2, 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 = 3, curline = 1, curcol = 1, linecount = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -8682,10 +8678,10 @@ describe('float window', function() {5:│}{1:cd }{5:│}| {5:└────┘}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 1, 1, true, 50}; + [4] = {1001, "NW", 1, 1, 1, true, 50}; }, 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 = 1, curcol = 1, linecount = 2, 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 = 1, curcol = 1, linecount = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -8717,10 +8713,10 @@ describe('float window', function() {5:│}{1:c^d }{5:│}| {5:└────┘}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 1, 1, true, 50}; + [4] = {1001, "NW", 1, 1, 1, true, 50}; }, 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 = 1, curcol = 1, linecount = 2, 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 = 1, curcol = 1, linecount = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -8759,10 +8755,10 @@ describe('float window', function() {5:│}{2: ~}{5:│}| {5:└─────┘}| ]], float_pos={ - [4] = {{id = 1001}, "NW", 1, 1, 1, true, 50}; + [4] = {1001, "NW", 1, 1, 1, true, 50}; }, 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 = 3, curline = 1, curcol = 2, linecount = 2, 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 = 3, curline = 1, curcol = 2, linecount = 2, sum_scroll_delta = 0}; }} else screen:expect{grid=[[ @@ -8781,7 +8777,7 @@ describe('float window', function() local buf = api.nvim_create_buf(false,false) local win = api.nvim_open_win(buf, false, {relative='editor', width=10, height=2, row=2, col=5, hide = true}) local expected_pos = { - [4]={{id=1001}, 'NW', 1, 2, 5, true}, + [4]={1001, 'NW', 1, 2, 5, true}, } if multigrid then @@ -8873,10 +8869,10 @@ describe('float window', function() api.nvim_open_win(buf_c, false, config_c) api.nvim_open_win(buf_d, false, config_d) local expected_pos = { - [4]={{id=1001}, 'NW', 1, 5, 5, true, 50}, - [5]={{id=1002}, 'NW', 1, 7, 7, true, 70}, - [6]={{id=1003}, 'NW', 1, 9, 9, true, 90}, - [7]={{id=1004}, 'NW', 1, 10, 10, true, 100}, + [4]={1001, 'NW', 1, 5, 5, true, 50}, + [5]={1002, 'NW', 1, 7, 7, true, 70}, + [6]={1003, 'NW', 1, 9, 9, true, 90}, + [7]={1004, 'NW', 1, 10, 10, true, 100}, } if multigrid then screen:expect{grid=[[ diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua index 833e3833d5..a440645fe2 100644 --- a/test/functional/ui/fold_spec.lua +++ b/test/functional/ui/fold_spec.lua @@ -1578,7 +1578,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 0, botline = 5, curline = 0, @@ -1616,7 +1616,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 0, botline = 5, curline = 2, @@ -1656,7 +1656,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 0, botline = 6, curline = 0, @@ -1718,7 +1718,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 0, botline = 6, curline = 4, @@ -1760,7 +1760,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 1, botline = 6, curline = 4, @@ -1800,7 +1800,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 2, botline = 6, curline = 4, @@ -1838,7 +1838,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 2, botline = 6, curline = 4, @@ -1874,7 +1874,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 2, botline = 6, curline = 4, @@ -1908,7 +1908,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 4, botline = 6, curline = 4, @@ -1944,7 +1944,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 2, botline = 6, curline = 4, @@ -1983,7 +1983,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 2, botline = 6, curline = 4, @@ -2021,7 +2021,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 2, botline = 6, curline = 4, @@ -2057,7 +2057,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 2, botline = 6, curline = 4, @@ -2099,7 +2099,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 0, botline = 3, curline = 0, @@ -2108,7 +2108,7 @@ describe('folded lines', function() sum_scroll_delta = 0, }, [4] = { - win = { id = 1001 }, + win = 1001, topline = 0, botline = 2, curline = 0, @@ -2153,7 +2153,7 @@ describe('folded lines', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 0, botline = 3, curline = 0, @@ -2162,7 +2162,7 @@ describe('folded lines', function() sum_scroll_delta = -1, }, [4] = { - win = { id = 1001 }, + win = 1001, topline = 0, botline = 2, curline = 0, diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua index a7710ab584..6a1b3fb0ed 100644 --- a/test/functional/ui/mouse_spec.lua +++ b/test/functional/ui/mouse_spec.lua @@ -813,7 +813,7 @@ describe('ui/mouse/input', function() it('dragging vertical separator', function() screen:try_resize(45, 5) command('setlocal nowrap') - local oldwin = api.nvim_get_current_win().id + local oldwin = api.nvim_get_current_win() command('rightbelow vnew') screen:expect([[ testing │{0:^$} | @@ -1688,7 +1688,7 @@ describe('ui/mouse/input', function() local col = win_col + opts.col api.nvim_input_mouse('left', 'press', '', 0, row, col) local mousepos = fn.getmousepos() - eq(float.id, mousepos.winid) + eq(float, mousepos.winid) eq(win_row + 1, mousepos.winrow) eq(win_col + 1, mousepos.wincol) local line = 0 @@ -1723,7 +1723,7 @@ describe('ui/mouse/input', function() local col = win_col + opts.col api.nvim_input_mouse('left', 'press', '', 0, row, col) local mousepos = fn.getmousepos() - eq(float.id, mousepos.winid) + eq(float, mousepos.winid) eq(win_row + 1, mousepos.winrow) eq(win_col + 1, mousepos.wincol) local line = math.min(win_row + 1, fn.line('$')) diff --git a/test/functional/ui/multigrid_spec.lua b/test/functional/ui/multigrid_spec.lua index c77363e584..673e729a39 100644 --- a/test/functional/ui/multigrid_spec.lua +++ b/test/functional/ui/multigrid_spec.lua @@ -75,8 +75,8 @@ describe('ext_multigrid', function() {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') @@ -101,9 +101,9 @@ describe('ext_multigrid', function() {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') @@ -125,8 +125,8 @@ describe('ext_multigrid', function() {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) @@ -456,7 +456,7 @@ describe('ext_multigrid', function() it('winwidth() winheight() getwininfo() return inner width and height #19743', function() eq(60, fn.winwidth(0)) eq(20, fn.winheight(0)) - local win_info = fn.getwininfo(curwin().id)[1] + local win_info = fn.getwininfo(curwin())[1] eq(60, win_info.width) eq(20, win_info.height) end) @@ -616,7 +616,7 @@ describe('ext_multigrid', function() {21: }| {22:~ }|*4 ]], float_pos={ - [4] = {{id = 1001}, "SE", 2, 16, 58, true, 50}; + [4] = {1001, "SE", 2, 16, 58, true, 50}; }} end) @@ -638,7 +638,7 @@ describe('ext_multigrid', function() {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>') @@ -660,7 +660,7 @@ describe('ext_multigrid', function() {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>') @@ -682,7 +682,7 @@ describe('ext_multigrid', function() {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) @@ -1221,7 +1221,7 @@ describe('ext_multigrid', function() ## 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=[[ @@ -1295,7 +1295,7 @@ describe('ext_multigrid', function() ## 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=[[ @@ -1417,7 +1417,7 @@ describe('ext_multigrid', function() ## 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=[[ @@ -1549,7 +1549,7 @@ describe('ext_multigrid', function() ## 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=[[ @@ -1632,7 +1632,7 @@ describe('ext_multigrid', function() ## 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 @@ -1662,7 +1662,7 @@ 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}, }} @@ -1682,7 +1682,7 @@ 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") @@ -1703,8 +1703,8 @@ 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") @@ -1725,8 +1725,8 @@ 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") @@ -1747,8 +1747,8 @@ 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 @@ -1770,8 +1770,8 @@ 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 @@ -1793,8 +1793,8 @@ 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>') @@ -1815,8 +1815,8 @@ 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') @@ -1842,8 +1842,8 @@ 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>') @@ -1869,8 +1869,8 @@ 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>') @@ -1896,8 +1896,8 @@ 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') @@ -1923,8 +1923,8 @@ 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>') @@ -1950,8 +1950,8 @@ 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>') @@ -1977,8 +1977,8 @@ 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') @@ -2004,8 +2004,8 @@ 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>') @@ -2031,8 +2031,8 @@ 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>') @@ -2058,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) @@ -2087,7 +2087,7 @@ 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=[[ @@ -2111,7 +2111,7 @@ 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=[[ @@ -2135,7 +2135,7 @@ 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=[[ @@ -2159,7 +2159,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}; }} feed('G') screen:expect{grid=[[ @@ -2183,7 +2183,7 @@ 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=[[ @@ -2207,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) @@ -2224,7 +2224,7 @@ describe('ext_multigrid', function() ## 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 @@ -2254,7 +2254,7 @@ 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}, }} api.nvim_input_mouse('left', 'press', '', 1,5, 1) @@ -2276,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) @@ -2298,8 +2298,8 @@ describe('ext_multigrid', function() ^ | {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. @@ -2328,8 +2328,8 @@ describe('ext_multigrid', function() ^ | {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) @@ -2350,8 +2350,8 @@ describe('ext_multigrid', function() ^ | {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) diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index 941b8b69bf..b74a15d56f 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -1209,7 +1209,7 @@ describe('builtin popupmenu', function() {n:hh }{s: }| ]], float_pos = { - [5] = { { id = -1 }, 'NW', 2, 2, 0, false, 100 }, + [5] = { -1, 'NW', 2, 2, 0, false, 100 }, }, } else @@ -1267,7 +1267,7 @@ describe('builtin popupmenu', function() {n:hh }{s: }| ]], float_pos = { - [5] = { { id = -1 }, 'NW', 2, 2, 0, false, 100 }, + [5] = { -1, 'NW', 2, 2, 0, false, 100 }, }, } else @@ -1343,7 +1343,7 @@ describe('builtin popupmenu', function() {n:mm }{s: }| ]], float_pos = { - [5] = { { id = -1 }, 'SW', 2, 12, 0, false, 100 }, + [5] = { -1, 'SW', 2, 12, 0, false, 100 }, }, } else @@ -1419,7 +1419,7 @@ describe('builtin popupmenu', function() {n:ii }{s: }| ]], float_pos = { - [5] = { { id = -1 }, 'SW', 2, 8, 0, false, 100 }, + [5] = { -1, 'SW', 2, 8, 0, false, 100 }, }, } else @@ -1494,7 +1494,7 @@ describe('builtin popupmenu', function() {n:hh }{s: }| ]], float_pos = { - [5] = { { id = -1 }, 'SW', 2, 8, 0, false, 100 }, + [5] = { -1, 'SW', 2, 8, 0, false, 100 }, }, } else @@ -1630,8 +1630,8 @@ describe('builtin popupmenu', function() {n:three }| ]], float_pos = { - [5] = { { id = -1 }, 'NW', 2, 1, 0, false, 100 }, - [4] = { { id = 1001 }, 'NW', 1, 1, 15, true, 50 }, + [5] = { -1, 'NW', 2, 1, 0, false, 100 }, + [4] = { 1001, 'NW', 1, 1, 15, true, 50 }, }, } else @@ -1671,8 +1671,8 @@ describe('builtin popupmenu', function() {s:three }| ]], float_pos = { - [5] = { { id = -1 }, 'NW', 2, 1, 0, false, 100 }, - [4] = { { id = 1001 }, 'NW', 1, 1, 15, true, 50 }, + [5] = { -1, 'NW', 2, 1, 0, false, 100 }, + [4] = { 1001, 'NW', 1, 1, 15, true, 50 }, }, } else @@ -1715,12 +1715,12 @@ describe('builtin popupmenu', function() {n: }| ]], float_pos = { - [5] = { { id = -1 }, 'NW', 2, 1, 19, false, 100 }, - [6] = { { id = 1002 }, 'NW', 1, 1, 1, true, 50 }, + [5] = { -1, 'NW', 2, 1, 19, false, 100 }, + [6] = { 1002, 'NW', 1, 1, 1, true, 50 }, }, win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 0, botline = 2, curline = 0, @@ -1729,7 +1729,7 @@ describe('builtin popupmenu', function() sum_scroll_delta = 0, }, [6] = { - win = { id = 1002 }, + win = 1002, topline = 0, botline = 2, curline = 0, @@ -1811,7 +1811,7 @@ describe('builtin popupmenu', function() {n: aac }| ]], float_pos = { - [5] = { { id = -1 }, 'NW', 4, 2, 3, false, 100 }, + [5] = { -1, 'NW', 4, 2, 3, false, 100 }, }, } else @@ -1853,7 +1853,7 @@ describe('builtin popupmenu', function() {n: aac }| ]], float_pos = { - [5] = { { id = -1 }, 'NW', 2, 3, 1, false, 100 }, + [5] = { -1, 'NW', 2, 3, 1, false, 100 }, }, } else @@ -1897,7 +1897,7 @@ describe('builtin popupmenu', function() {n: aaabcdef}| ]], float_pos = { - [5] = { { id = -1 }, 'NW', 2, 3, 11, false, 100 }, + [5] = { -1, 'NW', 2, 3, 11, false, 100 }, }, } else @@ -1942,7 +1942,7 @@ describe('builtin popupmenu', function() {n: aac }{s: }| ]], float_pos = { - [5] = { { id = -1 }, 'NW', 2, 4, -1, false, 100 }, + [5] = { -1, 'NW', 2, 4, -1, false, 100 }, }, } else @@ -2476,7 +2476,7 @@ describe('builtin popupmenu', function() {s: }{n: eciohc }| ]], float_pos = { - [5] = { { id = -1 }, 'NW', 4, 1, -11, false, 100 }, + [5] = { -1, 'NW', 4, 1, -11, false, 100 }, }, } else @@ -2513,7 +2513,7 @@ describe('builtin popupmenu', function() {s: }{n: eciohc}| ]], float_pos = { - [5] = { { id = -1 }, 'NW', 4, 2, 4, false, 100 }, + [5] = { -1, 'NW', 4, 2, 4, false, 100 }, }, } else @@ -2580,7 +2580,7 @@ describe('builtin popupmenu', function() {n:jump }{s: }| ]], float_pos = { - [5] = { { id = -1 }, 'SW', 1, 5, 0, false, 250 }, + [5] = { -1, 'SW', 1, 5, 0, false, 250 }, }, } else @@ -3475,7 +3475,7 @@ describe('builtin popupmenu', function() {n: choice}{s: }| ]], float_pos = { - [4] = { { id = -1 }, 'NW', 2, 1, 24, false, 100 }, + [4] = { -1, 'NW', 2, 1, 24, false, 100 }, }, } else @@ -3514,7 +3514,7 @@ describe('builtin popupmenu', function() {n: thing }| ]], float_pos = { - [4] = { { id = -1 }, 'NW', 2, 1, 25, false, 100 }, + [4] = { -1, 'NW', 2, 1, 25, false, 100 }, }, } else @@ -3565,7 +3565,7 @@ describe('builtin popupmenu', function() ## grid 4 {n: 哦哦哦哦哦哦哦哦哦>}| ]], - float_pos = { [4] = { { id = -1 }, 'NW', 2, 1, 12, false, 100 } }, + float_pos = { [4] = { -1, 'NW', 2, 1, 12, false, 100 } }, }) else screen:expect([[ @@ -3602,7 +3602,7 @@ describe('builtin popupmenu', function() {n: 哦哦哦哦哦哦哦哦哦>}{c: }|*2 {n: 哦哦哦哦哦哦哦哦哦>}{s: }|*2 ]], - float_pos = { [4] = { { id = -1 }, 'NW', 2, 1, 11, false, 100 } }, + float_pos = { [4] = { -1, 'NW', 2, 1, 11, false, 100 } }, }) else screen:expect([[ @@ -3644,7 +3644,7 @@ describe('builtin popupmenu', function() {n: bar }| {n: baz }| ]], - float_pos = { [4] = { { id = -1 }, 'NW', 2, 1, 3, false, 250 } }, + float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } }, }) else feed('<RightMouse><4,0>') @@ -3674,7 +3674,7 @@ describe('builtin popupmenu', function() {n: bar }| {n: baz }| ]], - float_pos = { [4] = { { id = -1 }, 'NW', 2, 1, 3, false, 250 } }, + float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } }, }) else screen:expect([[ @@ -3703,7 +3703,7 @@ describe('builtin popupmenu', function() {s: bar }| {n: baz }| ]], - float_pos = { [4] = { { id = -1 }, 'NW', 2, 1, 3, false, 250 } }, + float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } }, }) else screen:expect([[ @@ -3755,7 +3755,7 @@ describe('builtin popupmenu', function() {n: bar }| {n: baz }| ]], - float_pos = { [4] = { { id = -1 }, 'NW', 2, 3, 19, false, 250 } }, + float_pos = { [4] = { -1, 'NW', 2, 3, 19, false, 250 } }, }) else feed('<RightMouse><20,2>') @@ -3785,7 +3785,7 @@ describe('builtin popupmenu', function() {n: baz }| ]], float_pos = { - [4] = { { id = -1 }, 'NW', 2, 1, 17, false, 250 }, + [4] = { -1, 'NW', 2, 1, 17, false, 250 }, }, } else @@ -3816,7 +3816,7 @@ describe('builtin popupmenu', function() {n: bar }| {n: baz }| ]], - float_pos = { [4] = { { id = -1 }, 'NW', 2, 3, 19, false, 250 } }, + float_pos = { [4] = { -1, 'NW', 2, 3, 19, false, 250 } }, }) else feed('<RightMouse><20,2>') @@ -3869,7 +3869,7 @@ describe('builtin popupmenu', function() {n: bar }| {n: baz }| ]], - float_pos = { [4] = { { id = -1 }, 'NW', 2, 1, 3, false, 250 } }, + float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } }, }) else feed('<RightMouse><4,0>') @@ -3899,7 +3899,7 @@ describe('builtin popupmenu', function() {n: bar }| {s: baz }| ]], - float_pos = { [4] = { { id = -1 }, 'NW', 2, 1, 3, false, 250 } }, + float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } }, }) else feed('<RightDrag><6,3>') @@ -3954,7 +3954,7 @@ describe('builtin popupmenu', function() {n: bar }| {n: baz }| ]], - float_pos = { [4] = { { id = -1 }, 'NW', 2, 1, 3, false, 250 } }, + float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } }, }) else feed('<RightMouse><4,0>') @@ -3985,7 +3985,7 @@ describe('builtin popupmenu', function() {n: bar }| {s: baz }| ]], - float_pos = { [4] = { { id = -1 }, 'NW', 2, 1, 3, false, 250 } }, + float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } }, }) else feed('<MouseMove><6,3>') @@ -4047,7 +4047,7 @@ describe('builtin popupmenu', function() ^popup menu test | {1:~ }| ]], - float_pos = { [4] = { { id = -1 }, 'SW', 5, 1, 19, false, 250 } }, + float_pos = { [4] = { -1, 'SW', 5, 1, 19, false, 250 } }, }) else feed('<RightMouse><20,4>') @@ -4118,7 +4118,7 @@ describe('builtin popupmenu', function() ^popup menu test | {1:~ }| ]], - float_pos = { [4] = { { id = -1 }, 'SW', 6, 1, 12, false, 250 } }, + float_pos = { [4] = { -1, 'SW', 6, 1, 12, false, 250 } }, }) else feed('<RightMouse><30,4>') @@ -4192,7 +4192,7 @@ describe('builtin popupmenu', function() {2:WINBAR }| ^popup menu test | ]], - float_pos = { [4] = { { id = -1 }, 'SW', 6, 1, 12, false, 250 } }, + float_pos = { [4] = { -1, 'SW', 6, 1, 12, false, 250 } }, }) else feed('<RightMouse><30,4>') diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index dba70f27e4..644ee910b6 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -1484,9 +1484,9 @@ local function fmt_ext_state(name, state) str .. ' [' .. k - .. '] = {win = {id = ' - .. v.win.id - .. '}, topline = ' + .. '] = {win = ' + .. v.win + .. ', topline = ' .. v.topline .. ', botline = ' .. v.botline @@ -1505,7 +1505,7 @@ local function fmt_ext_state(name, state) elseif name == 'float_pos' then local str = '{\n' for k, v in pairs(state) do - str = str .. ' [' .. k .. '] = {{id = ' .. v[1].id .. '}' + str = str .. ' [' .. k .. '] = {' .. v[1] for i = 2, #v do str = str .. ', ' .. inspect(v[i]) end diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua index f745cdb97b..a05436cf55 100644 --- a/test/functional/ui/searchhl_spec.lua +++ b/test/functional/ui/searchhl_spec.lua @@ -49,7 +49,7 @@ describe('search highlighting', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 0, botline = 3, curline = 0, @@ -617,7 +617,7 @@ describe('search highlighting', function() ]], win_viewport = { [2] = { - win = { id = 1000 }, + win = 1000, topline = 0, botline = 3, curline = 0, diff --git a/test/functional/ui/statusline_spec.lua b/test/functional/ui/statusline_spec.lua index d1bf163ab8..711e056376 100644 --- a/test/functional/ui/statusline_spec.lua +++ b/test/functional/ui/statusline_spec.lua @@ -138,7 +138,7 @@ for _, model in ipairs(mousemodels) do command('tabnew | tabprevious') api.nvim_set_option_value('statusline', '%2TNot clicky stuff%T', {}) api.nvim_input_mouse('left', 'press', '', 0, 6, 0) - eq(1, api.nvim_get_current_tabpage().id) + eq(1, api.nvim_get_current_tabpage()) api.nvim_set_option_value('statusline', '%2XNot clicky stuff%X', {}) api.nvim_input_mouse('left', 'press', '', 0, 6, 0) eq(2, #api.nvim_list_tabpages()) diff --git a/test/functional/ui/tabline_spec.lua b/test/functional/ui/tabline_spec.lua index d58155ef0c..25147a44a3 100644 --- a/test/functional/ui/tabline_spec.lua +++ b/test/functional/ui/tabline_spec.lua @@ -25,8 +25,8 @@ describe('ui/ext_tabline', function() command('tabedit another-tab') local expected_tabs = { - { tab = { id = 1 }, name = '[No Name]' }, - { tab = { id = 2 }, name = 'another-tab' }, + { tab = 1, name = '[No Name]' }, + { tab = 2, name = 'another-tab' }, } screen:expect { grid = [[ @@ -35,7 +35,7 @@ describe('ui/ext_tabline', function() | ]], condition = function() - eq({ id = 2 }, event_curtab) + eq(2, event_curtab) eq(expected_tabs, event_tabs) end, } @@ -48,7 +48,7 @@ describe('ui/ext_tabline', function() | ]], condition = function() - eq({ id = 1 }, event_curtab) + eq(1, event_curtab) eq(expected_tabs, event_tabs) end, } @@ -56,7 +56,7 @@ describe('ui/ext_tabline', function() it('buffer UI events', function() local expected_buffers_initial = { - { buffer = { id = 1 }, name = '[No Name]' }, + { buffer = 1, name = '[No Name]' }, } screen:expect { @@ -66,7 +66,7 @@ describe('ui/ext_tabline', function() | ]], condition = function() - eq({ id = 1 }, event_curbuf) + eq(1, event_curbuf) eq(expected_buffers_initial, event_buffers) end, } @@ -75,8 +75,8 @@ describe('ui/ext_tabline', function() command('bnext') local expected_buffers = { - { buffer = { id = 1 }, name = '[No Name]' }, - { buffer = { id = 2 }, name = 'another-buffer' }, + { buffer = 1, name = '[No Name]' }, + { buffer = 2, name = 'another-buffer' }, } screen:expect { grid = [[ @@ -85,7 +85,7 @@ describe('ui/ext_tabline', function() | ]], condition = function() - eq({ id = 2 }, event_curbuf) + eq(2, event_curbuf) eq(expected_buffers, event_buffers) end, } diff --git a/test/functional/ui/title_spec.lua b/test/functional/ui/title_spec.lua index c77e836d21..8060d3a460 100644 --- a/test/functional/ui/title_spec.lua +++ b/test/functional/ui/title_spec.lua @@ -96,7 +96,7 @@ describe('title', function() end) it('setting the buffer of another window using RPC', function() - local oldwin = curwin().id + local oldwin = curwin() command('split') api.nvim_win_set_buf(oldwin, buf2) command('redraw!') @@ -106,7 +106,7 @@ describe('title', function() end) it('setting the buffer of another window using Lua callback', function() - local oldwin = curwin().id + local oldwin = curwin() command('split') exec_lua(string.format( [[ diff --git a/test/functional/ui/winbar_spec.lua b/test/functional/ui/winbar_spec.lua index 858a537d3a..69789ce8c1 100644 --- a/test/functional/ui/winbar_spec.lua +++ b/test/functional/ui/winbar_spec.lua @@ -51,7 +51,7 @@ describe('winbar', function() ]]) -- winbar is excluded from the heights returned by winheight() and getwininfo() eq(11, fn.winheight(0)) - local win_info = fn.getwininfo(api.nvim_get_current_win().id)[1] + local win_info = fn.getwininfo(api.nvim_get_current_win())[1] eq(11, win_info.height) eq(1, win_info.winbar) end) @@ -428,7 +428,7 @@ describe('winbar', function() | ]], } - api.nvim_set_option_value('winbar', 'floaty bar', { scope = 'local', win = win.id }) + api.nvim_set_option_value('winbar', 'floaty bar', { scope = 'local', win = win }) screen:expect { grid = [[ {1:bar }| |