aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/functional/ui/decorations_spec.lua46
-rw-r--r--test/old/testdir/test_conceal.vim10
-rw-r--r--test/old/testdir/test_highlight.vim5
3 files changed, 39 insertions, 22 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 395176f005..ed562555e3 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -2831,146 +2831,156 @@ bbbbbbb]])
it('blockwise Visual highlight with double-width virtual text (replace)', function()
screen:try_resize(60, 6)
- insert('123456789\n123456789\n123456789')
+ insert('123456789\n123456789\n123456789\n123456789')
meths.buf_set_extmark(0, ns, 1, 1, {
virt_text = { { '-口-', 'Special' } },
virt_text_pos = 'inline',
hl_mode = 'replace',
})
+ meths.buf_set_extmark(0, ns, 2, 2, {
+ virt_text = { { '口', 'Special' } },
+ virt_text_pos = 'inline',
+ hl_mode = 'replace',
+ })
feed('gg0')
screen:expect{grid=[[
^123456789 |
1{10:-口-}23456789 |
+ 12{10:口}3456789 |
123456789 |
{1:~ }|
- {1:~ }|
|
]]}
- feed('<C-V>2jl')
+ feed('<C-V>3jl')
screen:expect{grid=[[
{7:12}3456789 |
{7:1}{10:-口-}23456789 |
+ {7:12}{10:口}3456789 |
{7:1}^23456789 |
{1:~ }|
- {1:~ }|
{8:-- VISUAL BLOCK --} |
]]}
feed('l')
screen:expect{grid=[[
{7:123}456789 |
{7:1}{10:-口-}23456789 |
+ {7:12}{10:口}3456789 |
{7:12}^3456789 |
{1:~ }|
- {1:~ }|
{8:-- VISUAL BLOCK --} |
]]}
feed('4l')
screen:expect{grid=[[
{7:1234567}89 |
{7:1}{10:-口-}{7:23}456789 |
+ {7:12}{10:口}{7:345}6789 |
{7:123456}^789 |
{1:~ }|
- {1:~ }|
{8:-- VISUAL BLOCK --} |
]]}
feed('Ol')
screen:expect{grid=[[
1{7:234567}89 |
1{10:-口-}{7:23}456789 |
+ 1{7:2}{10:口}{7:345}6789 |
1^2{7:34567}89 |
{1:~ }|
- {1:~ }|
{8:-- VISUAL BLOCK --} |
]]}
feed('l')
screen:expect{grid=[[
12{7:34567}89 |
1{10:-口-}{7:23}456789 |
+ 12{10:口}{7:345}6789 |
12^3{7:4567}89 |
{1:~ }|
- {1:~ }|
{8:-- VISUAL BLOCK --} |
]]}
feed('l')
screen:expect{grid=[[
123{7:4567}89 |
1{10:-口-}{7:23}456789 |
+ 12{10:口}{7:345}6789 |
123^4{7:567}89 |
{1:~ }|
- {1:~ }|
{8:-- VISUAL BLOCK --} |
]]}
end)
it('blockwise Visual highlight with double-width virtual text (combine)', function()
screen:try_resize(60, 6)
- insert('123456789\n123456789\n123456789')
+ insert('123456789\n123456789\n123456789\n123456789')
meths.buf_set_extmark(0, ns, 1, 1, {
virt_text = { { '-口-', 'Special' } },
virt_text_pos = 'inline',
hl_mode = 'combine',
})
+ meths.buf_set_extmark(0, ns, 2, 2, {
+ virt_text = { { '口', 'Special' } },
+ virt_text_pos = 'inline',
+ hl_mode = 'combine',
+ })
feed('gg0')
screen:expect{grid=[[
^123456789 |
1{10:-口-}23456789 |
+ 12{10:口}3456789 |
123456789 |
{1:~ }|
- {1:~ }|
|
]]}
- feed('<C-V>2jl')
+ feed('<C-V>3jl')
screen:expect{grid=[[
{7:12}3456789 |
{7:1}{20:-}{10:口-}23456789 |
+ {7:12}{10:口}3456789 |
{7:1}^23456789 |
{1:~ }|
- {1:~ }|
{8:-- VISUAL BLOCK --} |
]]}
feed('l')
screen:expect{grid=[[
{7:123}456789 |
{7:1}{20:-口}{10:-}23456789 |
+ {7:12}{20:口}3456789 |
{7:12}^3456789 |
{1:~ }|
- {1:~ }|
{8:-- VISUAL BLOCK --} |
]]}
feed('4l')
screen:expect{grid=[[
{7:1234567}89 |
{7:1}{20:-口-}{7:23}456789 |
+ {7:12}{20:口}{7:345}6789 |
{7:123456}^789 |
{1:~ }|
- {1:~ }|
{8:-- VISUAL BLOCK --} |
]]}
feed('Ol')
screen:expect{grid=[[
1{7:234567}89 |
1{20:-口-}{7:23}456789 |
+ 1{7:2}{20:口}{7:345}6789 |
1^2{7:34567}89 |
{1:~ }|
- {1:~ }|
{8:-- VISUAL BLOCK --} |
]]}
feed('l')
screen:expect{grid=[[
12{7:34567}89 |
1{10:-}{20:口-}{7:23}456789 |
+ 12{20:口}{7:345}6789 |
12^3{7:4567}89 |
{1:~ }|
- {1:~ }|
{8:-- VISUAL BLOCK --} |
]]}
feed('l')
screen:expect{grid=[[
123{7:4567}89 |
1{10:-}{20:口-}{7:23}456789 |
+ 12{20:口}{7:345}6789 |
123^4{7:567}89 |
{1:~ }|
- {1:~ }|
{8:-- VISUAL BLOCK --} |
]]}
end)
diff --git a/test/old/testdir/test_conceal.vim b/test/old/testdir/test_conceal.vim
index 0ec171aa2f..a679061544 100644
--- a/test/old/testdir/test_conceal.vim
+++ b/test/old/testdir/test_conceal.vim
@@ -345,6 +345,10 @@ func Test_conceal_mouse_click()
redraw
call assert_equal(['conceal click here '], ScreenLines(1, 20))
+ " click on the space between "this" and "click" puts cursor there
+ call Ntest_setmouse(1, 9)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 13, 0, 13], getcurpos())
" click on 'h' of "here" puts cursor there
call Ntest_setmouse(1, 16)
call feedkeys("\<LeftMouse>", "tx")
@@ -371,7 +375,11 @@ func Test_conceal_mouse_click()
call assert_equal([0, 1, 23, 0, 36], getcurpos())
set virtualedit=all
- redraw " Nvim: redraw_for_cursorcolumn() redraws for conceal
+ redraw
+ " click on the space between "this" and "click" puts cursor there
+ call Ntest_setmouse(1, 9)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 13, 0, 13], getcurpos())
" click on 'h' of "here" puts cursor there
call Ntest_setmouse(1, 16)
call feedkeys("\<LeftMouse>", "tx")
diff --git a/test/old/testdir/test_highlight.vim b/test/old/testdir/test_highlight.vim
index dcfd1a350a..14c208521b 100644
--- a/test/old/testdir/test_highlight.vim
+++ b/test/old/testdir/test_highlight.vim
@@ -698,10 +698,9 @@ func Test_colorcolumn_sbr()
let lines =<< trim END
call setline(1, 'The quick brown fox jumped over the lazy dogs')
END
- call writefile(lines, 'Xtest_colorcolumn_srb', 'D')
- let buf = RunVimInTerminal('-S Xtest_colorcolumn_srb', {'rows': 10,'columns': 40})
+ call writefile(lines, 'Xtest_colorcolumn_sbr', 'D')
+ let buf = RunVimInTerminal('-S Xtest_colorcolumn_sbr', {'rows': 10,'columns': 40})
call term_sendkeys(buf, ":set co=40 showbreak=+++>\\ cc=40,41,43\<CR>")
- call TermWait(buf)
call VerifyScreenDump(buf, 'Test_colorcolumn_3', {})
" clean up