diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 130 | ||||
-rw-r--r-- | test/functional/ui/float_spec.lua | 184 | ||||
-rw-r--r-- | test/functional/ui/fold_spec.lua | 33 | ||||
-rw-r--r-- | test/functional/ui/mouse_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/ui/multigrid_spec.lua | 1 | ||||
-rw-r--r-- | test/functional/ui/statuscolumn_spec.lua | 2 | ||||
-rw-r--r-- | test/old/testdir/test_filetype.vim | 1 | ||||
-rw-r--r-- | test/old/testdir/test_jumplist.vim | 66 | ||||
-rw-r--r-- | test/old/testdir/test_normal.vim | 33 | ||||
-rw-r--r-- | test/old/testdir/test_virtualedit.vim | 23 |
10 files changed, 455 insertions, 22 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index daa4b4bdb3..d6a6243be2 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -1237,6 +1237,25 @@ describe('extmark decorations', function() | ]]} + meths.buf_set_extmark(0, ns, 4, 50, { virt_text={{'EOL', 'NonText'}} }) + screen:expect{grid=[[ + for _,item in ipairs(items) do | + local text, hl_id_cell, cou{4:Very} unpack(ite{4:VERY}| + if | + hl_id_cell ~= nil then {4:Much} {4:MUCH}| + --^ -- -- -- -- -- -- --{4:Error}- -- hl_i{4:ERROR}| + l_id_cell {1:EOL} | + end | + for _ = 1, (count or 1) do | + local cell = line[colpos] | + {1:-} cell.text = text {1:-}| + cell.hl_id = hl_id | + colpos = colpos+1 | + end | + end | + | + ]]} + feed '.' screen:expect{grid=[[ for _,item in ipairs(items) do | @@ -1244,7 +1263,7 @@ describe('extmark decorations', function() if | hl_id_cell ~= nil then {4:Much} {4:MUCH}| --^ -- -- -- -- -- -- -- -- -- -- -- hl_id | - = hl_id_cell {4:Error} {4:ERROR}| + = hl_id_cell {1:EOL} {4:Error} {4:ERROR}| end | for _ = 1, (count or 1) do | local cell = line[colpos] | @@ -1264,7 +1283,7 @@ describe('extmark decorations', function() {2: 3 } if | {2: 4 }hl_id_cell ~= nil then {4:Much} {4:MUCH}| {2: 5 } --^ -- -- -- -- -- -- -- -- -- -- -- hl| - {2: }_id = hl_id_cell {4:Error} {4:ERROR}| + {2: }_id = hl_id_cell {1:EOL} {4:Error} {4:ERROR}| {2: 6 } end | {2: 7 } for _ = 1, (count or 1) do | {2: 8 } local cell = line[colpos] | @@ -1283,7 +1302,7 @@ describe('extmark decorations', function() {2: 3 } if | {2: 4 }hl_id_cell ~= nil then {4:Much} {4:MUCH}| {2: 5 } --^ -- -- -- -- -- -- -- -- -- -- -- hl| - _id = hl_id_cell {4:Error} {4:ERROR}| + _id = hl_id_cell {1:EOL} {4:Error} {4:ERROR}| {2: 6 } end | {2: 7 } for _ = 1, (count or 1) do | {2: 8 } local cell = line[colpos] | @@ -1891,6 +1910,84 @@ describe('extmark decorations', function() | ]]} end) + + it('virtual text works with rightleft', function() + screen:try_resize(50, 3) + insert('abcdefghijklmn') + feed('0') + command('set rightleft') + meths.buf_set_extmark(0, ns, 0, 0, { virt_text = {{'EOL', 'Underlined'}}}) + meths.buf_set_extmark(0, ns, 0, 0, { virt_text = {{'right_align', 'Underlined'}}, virt_text_pos = 'right_align' }) + meths.buf_set_extmark(0, ns, 0, 0, { virt_text = {{'win_col', 'Underlined'}}, virt_text_win_col = 20 }) + meths.buf_set_extmark(0, ns, 0, 2, { virt_text = {{'overlayed', 'Underlined'}}, virt_text_pos = 'overlay' }) + screen:expect{grid=[[ + {28:ngila_thgir} {28:loc_niw} {28:LOE} nml{28:deyalrevo}b^a| + {1: ~}| + | + ]]} + + insert(('#'):rep(32)) + feed('0') + screen:expect{grid=[[ + {28:ngila_tdeyalrevo}ba#####{28:loc_niw}###################^#| + {1: ~}| + | + ]]} + + insert(('#'):rep(16)) + feed('0') + screen:expect{grid=[[ + {28:ngila_thgir}############{28:loc_niw}###################^#| + {28:LOE} nml{28:deyalrevo}| + | + ]]} + + insert('###') + feed('0') + screen:expect{grid=[[ + #################################################^#| + {28:ngila_thgir} {28:loc_niw} {28:LOE} nml{28:deyalrevo}ba#| + | + ]]} + + command('set number') + screen:expect{grid=[[ + #############################################^#{2: 1 }| + {28:ngila_thgir} {28:loc_niw} nml{28:deyalrevo}ba#####{2: }| + | + ]]} + + command('set cpoptions+=n') + screen:expect{grid=[[ + #############################################^#{2: 1 }| + {28:ngila_thgir} {28:loc_niw} nml{28:deyalrevo}ba#####| + | + ]]} + end) + + it('works with double width char and rightleft', function() + screen:try_resize(50, 3) + insert('abcdefghij口klmnop') + feed('0') + command('set rightleft') + screen:expect{grid=[[ + ponmlk口jihgfedcb^a| + {1: ~}| + | + ]]} + meths.buf_set_extmark(0, ns, 0, 2, { virt_text = {{'overlayed', 'Underlined'}}, virt_text_pos = 'overlay' }) + screen:expect{grid=[[ + ponmlk {28:deyalrevo}b^a| + {1: ~}| + | + ]]} + meths.buf_set_extmark(0, ns, 0, 15, { virt_text = {{'古', 'Underlined'}}, virt_text_pos = 'overlay' }) + screen:expect{grid=[[ + po{28:古}lk {28:deyalrevo}b^a| + {1: ~}| + | + ]]} + end) end) describe('decorations: inline virtual text', function() @@ -4226,6 +4323,7 @@ if (h->n_buckets < new_n_buckets) { // expand end) it('does not show twice if end_row or end_col is specified #18622', function() + screen:try_resize(50, 8) insert([[ aaa bbb @@ -4241,10 +4339,28 @@ if (h->n_buckets < new_n_buckets) { // expand dd^d | {1:VIRT LINE 2} | {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + | + ]]} + end) + + it('works with rightleft', function() + screen:try_resize(50, 8) + insert([[ + aaa + bbb + ccc + ddd]]) + command('set number rightleft') + meths.buf_set_extmark(0, ns, 0, 0, {virt_lines = {{{'VIRT LINE 1', 'NonText'}}}, virt_lines_leftcol = true}) + meths.buf_set_extmark(0, ns, 3, 0, {virt_lines = {{{'VIRT LINE 2', 'NonText'}}}}) + screen:expect{grid=[[ + aaa{9: 1 }| + {1:1 ENIL TRIV}| + bbb{9: 2 }| + ccc{9: 3 }| + ^ddd{9: 4 }| + {1:2 ENIL TRIV}{9: }| + {1: ~}| | ]]} end) diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index f75fb52108..4fea513249 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -6287,7 +6287,7 @@ describe('float window', function() end if multigrid then - meths.input_mouse('left', 'press', '', 1, 0, 0) + meths.input_mouse('left', 'press', '', 2, 0, 0) screen:expect{grid=[[ ## grid 1 [2:----------------------------------------]| @@ -6366,7 +6366,7 @@ describe('float window', function() end if multigrid then - meths.input_mouse('left', 'press', '', 1, 0, 0) + meths.input_mouse('left', 'press', '', 2, 0, 0) screen:expect{grid=[[ ## grid 1 [2:----------------------------------------]| @@ -8764,6 +8764,186 @@ describe('float window', function() end end) + it('left click sets correct curswant in float window with border', function() + local buf = meths.create_buf(false,false) + meths.buf_set_lines(buf, 0, -1, true, {'', '', ''}) + meths.open_win(buf, false, {relative='editor', width=20, height=3, row=0, col=5, border='single'}) + if multigrid then + screen:expect{grid=[[ + ## grid 1 + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [3:----------------------------------------]| + ## grid 2 + ^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + ## grid 3 + | + ## grid 4 + {5:┌────────────────────┐}| + {5:│}{1: }{5:│}| + {5:│}{1: }{5:│}| + {5:│}{1: }{5:│}| + {5:└────────────────────┘}| + ]], float_pos={ + [4] = {{id = 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}; + }} + else + screen:expect{grid=[[ + ^ {5:┌────────────────────┐} | + {0:~ }{5:│}{1: }{5:│}{0: }| + {0:~ }{5:│}{1: }{5:│}{0: }| + {0:~ }{5:│}{1: }{5:│}{0: }| + {0:~ }{5:└────────────────────┘}{0: }| + {0:~ }| + | + ]]} + end + + if multigrid then + meths.input_mouse('left', 'press', '', 4, 3, 1) + else + meths.input_mouse('left', 'press', '', 0, 3, 6) + end + eq({0, 3, 1, 0, 1}, funcs.getcurpos()) + + if multigrid then + meths.input_mouse('left', 'press', '', 4, 3, 2) + else + meths.input_mouse('left', 'press', '', 0, 3, 7) + end + eq({0, 3, 1, 0, 2}, funcs.getcurpos()) + + if multigrid then + meths.input_mouse('left', 'press', '', 4, 3, 10) + else + meths.input_mouse('left', 'press', '', 0, 3, 15) + end + eq({0, 3, 1, 0, 10}, funcs.getcurpos()) + + command('setlocal foldcolumn=1') + feed('zfkgg') + if multigrid then + screen:expect{grid=[[ + ## grid 1 + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [3:----------------------------------------]| + ## grid 2 + | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + ## grid 3 + | + ## grid 4 + {5:┌────────────────────┐}| + {5:│}{19: }{1:^ }{5:│}| + {5:│}{19:+}{28:+-- 2 lines: ·····}{5:│}| + {5:│}{2:~ }{5:│}| + {5:└────────────────────┘}| + ]], float_pos={ + [4] = {{id = 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}; + }} + else + screen:expect{grid=[[ + {5:┌────────────────────┐} | + {0:~ }{5:│}{19: }{1:^ }{5:│}{0: }| + {0:~ }{5:│}{19:+}{28:+-- 2 lines: ·····}{5:│}{0: }| + {0:~ }{5:│}{2:~ }{5:│}{0: }| + {0:~ }{5:└────────────────────┘}{0: }| + {0:~ }| + | + ]]} + end + + if multigrid then + meths.input_mouse('left', 'press', '', 4, 2, 1) + screen:expect{grid=[[ + ## grid 1 + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [3:----------------------------------------]| + ## grid 2 + | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + ## grid 3 + | + ## grid 4 + {5:┌────────────────────┐}| + {5:│}{19: }{1:^ }{5:│}| + {5:│}{19:-}{1: }{5:│}| + {5:│}{19:│}{1: }{5:│}| + {5:└────────────────────┘}| + ]], float_pos={ + [4] = {{id = 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}; + }} + else + meths.input_mouse('left', 'press', '', 0, 2, 6) + screen:expect{grid=[[ + {5:┌────────────────────┐} | + {0:~ }{5:│}{19: }{1:^ }{5:│}{0: }| + {0:~ }{5:│}{19:-}{1: }{5:│}{0: }| + {0:~ }{5:│}{19:│}{1: }{5:│}{0: }| + {0:~ }{5:└────────────────────┘}{0: }| + {0:~ }| + | + ]]} + end + + if multigrid then + meths.input_mouse('left', 'press', '', 4, 2, 2) + else + meths.input_mouse('left', 'press', '', 0, 2, 7) + end + eq({0, 2, 1, 0, 1}, funcs.getcurpos()) + + if multigrid then + meths.input_mouse('left', 'press', '', 4, 2, 3) + else + meths.input_mouse('left', 'press', '', 0, 2, 8) + end + eq({0, 2, 1, 0, 2}, funcs.getcurpos()) + + if multigrid then + meths.input_mouse('left', 'press', '', 4, 2, 11) + else + meths.input_mouse('left', 'press', '', 0, 2, 16) + end + eq({0, 2, 1, 0, 10}, funcs.getcurpos()) + end) + it("'winblend' option", function() screen:try_resize(50,9) screen:set_default_attr_ids({ diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua index c8ca5be282..5e907f82ba 100644 --- a/test/functional/ui/fold_spec.lua +++ b/test/functional/ui/fold_spec.lua @@ -3047,6 +3047,39 @@ describe("folded lines", function() {11:-- VISUAL LINE --} | ]]) end + + meths.set_option_value('rightleft', true, {}) + if multigrid then + screen:expect([[ + ## grid 1 + [2:------------------------------]| + [2:------------------------------]| + [2:------------------------------]| + [2:------------------------------]| + [2:------------------------------]| + [2:------------------------------]| + [3:------------------------------]| + ## grid 2 + a si sihT{7: }| + {14:hsilgnE dila}^v{7: -}| + {20: desopmoc ecnetnes}{19: }{15:--}{7: +│}| + {15:······}{20:.evac sih ni}{19: }{15:--}{7: +│}| + {1: ~}| + {1: ~}| + ## grid 3 + {11:-- VISUAL LINE --} | + ]]) + else + screen:expect([[ + a si sihT{7: }| + {14:hsilgnE dila}^v{7: -}| + {20: desopmoc ecnetnes}{19: }{15:--}{7: +│}| + {15:······}{20:.evac sih ni}{19: }{15:--}{7: +│}| + {1: ~}| + {1: ~}| + {11:-- VISUAL LINE --} | + ]]) + end end) end diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua index a8d01cfbf1..fd24174f74 100644 --- a/test/functional/ui/mouse_spec.lua +++ b/test/functional/ui/mouse_spec.lua @@ -1676,7 +1676,7 @@ describe('ui/mouse/input', function() end) - it('getmousepos works correctly', function() + it('getmousepos() works correctly', function() local winwidth = meths.get_option_value('winwidth', {}) -- Set winwidth=1 so that window sizes don't change. meths.set_option_value('winwidth', 1, {}) @@ -1771,7 +1771,7 @@ describe('ui/mouse/input', function() -- Test that mouse position values are properly set for ordinary windows. -- Set the float to be unfocusable instead of closing, to additionally test - -- that getmousepos does not consider unfocusable floats. (see discussion + -- that getmousepos() does not consider unfocusable floats. (see discussion -- in PR #14937 for details). opts.focusable = false meths.win_set_config(float, opts) diff --git a/test/functional/ui/multigrid_spec.lua b/test/functional/ui/multigrid_spec.lua index 1778c8218b..6f4082beda 100644 --- a/test/functional/ui/multigrid_spec.lua +++ b/test/functional/ui/multigrid_spec.lua @@ -2307,6 +2307,7 @@ describe('ext_multigrid', function() {1:~ }| ]]} + -- XXX: mouse_check_grid() doesn't work properly when clicking on grid 1 meths.input_mouse('left', 'press', '', 1, 6, 20) -- TODO(bfredl): "batching" input_mouse is formally not supported yet. -- Normally it should work fine in async context when nvim is not blocked, diff --git a/test/functional/ui/statuscolumn_spec.lua b/test/functional/ui/statuscolumn_spec.lua index 742976cbe2..a7830abe8f 100644 --- a/test/functional/ui/statuscolumn_spec.lua +++ b/test/functional/ui/statuscolumn_spec.lua @@ -475,7 +475,7 @@ describe('statuscolumn', function() aaaaaaaaa | {1:virtual-2 15}virt_line1 | {1:virtual-2 15}virt_line2 | - {1:buffer 0 16}{5:^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}| + {4:buffer 0 16}{5:^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}| {5:aaaaaaaaa }| {1:virtual-1 16}END | {0:~ }| diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index e2b977c2b8..e5d7085d71 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -97,6 +97,7 @@ func s:GetFilenameChecks() abort \ 'asterisk': ['asterisk/file.conf', 'asterisk/file.conf-file', 'some-asterisk/file.conf', 'some-asterisk/file.conf-file'], \ 'astro': ['file.astro'], \ 'atlas': ['file.atl', 'file.as'], + \ 'authzed': ['file.zed'], \ 'autohotkey': ['file.ahk'], \ 'autoit': ['file.au3'], \ 'automake': ['GNUmakefile.am', 'makefile.am', 'Makefile.am'], diff --git a/test/old/testdir/test_jumplist.vim b/test/old/testdir/test_jumplist.vim index 91ad940e18..b4dcdad9d6 100644 --- a/test/old/testdir/test_jumplist.vim +++ b/test/old/testdir/test_jumplist.vim @@ -104,4 +104,70 @@ d bwipe! endfunc +" Test for 'jumpoptions' +func Test_jumpoptions() + new + call setline(1, range(1, 200)) + clearjumps + set jumpoptions=stack + + " Jump around to add some locations to the jump list. + normal 10G + normal 20G + normal 30G + normal 40G + normal 50G + let bnr = bufnr() + + " discards the tail when navigating from the middle + exe "normal \<C-O>\<C-O>" + call assert_equal([ + \ [{'lnum': 1, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 10, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 20, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 30, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 40, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 50, 'bufnr': bnr, 'col': 0, 'coladd': 0} + \ ], 3], getjumplist()) + + " new jump location is added immediately after the last one + normal 90G + call assert_equal([ + \ [{'lnum': 1, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 10, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 20, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 30, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ ], 4], getjumplist()) + + " does not add the same location twice adjacently + normal 60G + normal 60G + call assert_equal([ + \ [{'lnum': 1, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 10, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 20, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 30, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 90, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + "\ Nvim: avoids useless/phantom jumps + "\ {'lnum': 60, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + "\ ], 6], getjumplist()) + \ ], 5], getjumplist()) + + " does add the same location twice non adjacently + normal 10G + normal 20G + call assert_equal([ + \ [{'lnum': 1, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 10, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 20, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 30, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 90, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 60, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ {'lnum': 10, 'bufnr': bnr, 'col': 0, 'coladd': 0}, + \ ], 7], getjumplist()) + + set jumpoptions& + %bw! +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/test/old/testdir/test_normal.vim b/test/old/testdir/test_normal.vim index 3c21041899..09d3f0432f 100644 --- a/test/old/testdir/test_normal.vim +++ b/test/old/testdir/test_normal.vim @@ -4107,6 +4107,39 @@ func Test_normal_click_on_double_width_char() let &mouse = save_mouse endfunc +func Test_normal_click_on_empty_line() + let save_mouse = &mouse + set mouse=a + botright new + call setline(1, ['', '', '']) + let row = win_screenpos(0)[0] + 2 + 20vsplit + redraw + + call Ntest_setmouse(row, 1) + call feedkeys("\<LeftMouse>", 'xt') + call assert_equal([0, 3, 1, 0, 1], getcurpos()) + call Ntest_setmouse(row, 2) + call feedkeys("\<LeftMouse>", 'xt') + call assert_equal([0, 3, 1, 0, 2], getcurpos()) + call Ntest_setmouse(row, 10) + call feedkeys("\<LeftMouse>", 'xt') + call assert_equal([0, 3, 1, 0, 10], getcurpos()) + + call Ntest_setmouse(row, 21 + 1) + call feedkeys("\<LeftMouse>", 'xt') + call assert_equal([0, 3, 1, 0, 1], getcurpos()) + call Ntest_setmouse(row, 21 + 2) + call feedkeys("\<LeftMouse>", 'xt') + call assert_equal([0, 3, 1, 0, 2], getcurpos()) + call Ntest_setmouse(row, 21 + 10) + call feedkeys("\<LeftMouse>", 'xt') + call assert_equal([0, 3, 1, 0, 10], getcurpos()) + + bwipe! + let &mouse = save_mouse +endfunc + func Test_normal33_g_cmd_nonblank() " Test that g<End> goes to the last non-blank char and g$ to the last " visible column diff --git a/test/old/testdir/test_virtualedit.vim b/test/old/testdir/test_virtualedit.vim index 6ff51e36fb..4c11fcd99e 100644 --- a/test/old/testdir/test_virtualedit.vim +++ b/test/old/testdir/test_virtualedit.vim @@ -564,35 +564,38 @@ func Test_virtualedit_mouse() let save_mouse = &mouse set mouse=a set virtualedit=all - new + botright new + let row = win_screenpos(0)[0] + 20vsplit + wincmd p call setline(1, ["text\tword"]) redraw - call Ntest_setmouse(1, 4) + call Ntest_setmouse(row, 21 + 4) call feedkeys("\<LeftMouse>", "xt") call assert_equal([0, 1, 4, 0, 4], getcurpos()) - call Ntest_setmouse(1, 5) + call Ntest_setmouse(row, 21 + 5) call feedkeys("\<LeftMouse>", "xt") call assert_equal([0, 1, 5, 0, 5], getcurpos()) - call Ntest_setmouse(1, 6) + call Ntest_setmouse(row, 21 + 6) call feedkeys("\<LeftMouse>", "xt") call assert_equal([0, 1, 5, 1, 6], getcurpos()) - call Ntest_setmouse(1, 7) + call Ntest_setmouse(row, 21 + 7) call feedkeys("\<LeftMouse>", "xt") call assert_equal([0, 1, 5, 2, 7], getcurpos()) - call Ntest_setmouse(1, 8) + call Ntest_setmouse(row, 21 + 8) call feedkeys("\<LeftMouse>", "xt") call assert_equal([0, 1, 5, 3, 8], getcurpos()) - call Ntest_setmouse(1, 9) + call Ntest_setmouse(row, 21 + 9) call feedkeys("\<LeftMouse>", "xt") call assert_equal([0, 1, 6, 0, 9], getcurpos()) - call Ntest_setmouse(1, 12) + call Ntest_setmouse(row, 21 + 12) call feedkeys("\<LeftMouse>", "xt") call assert_equal([0, 1, 9, 0, 12], getcurpos()) - call Ntest_setmouse(1, 13) + call Ntest_setmouse(row, 21 + 13) call feedkeys("\<LeftMouse>", "xt") call assert_equal([0, 1, 10, 0, 13], getcurpos()) - call Ntest_setmouse(1, 15) + call Ntest_setmouse(row, 21 + 15) call feedkeys("\<LeftMouse>", "xt") call assert_equal([0, 1, 10, 2, 15], getcurpos()) |