diff options
Diffstat (limited to 'test/functional/ui')
| -rw-r--r-- | test/functional/ui/decorations_spec.lua | 46 |
1 files changed, 28 insertions, 18 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) |
