aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-01-09 05:37:08 +0800
committerGitHub <noreply@github.com>2024-01-09 05:37:08 +0800
commitee3d4f6b90d0902aa17936d1f0944755516569a1 (patch)
tree284a7556d4620f40071e857b29024706a944dd07 /test/functional
parentc4acbb87babf9c06198e56d85d113067fd705795 (diff)
downloadrneovim-ee3d4f6b90d0902aa17936d1f0944755516569a1.tar.gz
rneovim-ee3d4f6b90d0902aa17936d1f0944755516569a1.tar.bz2
rneovim-ee3d4f6b90d0902aa17936d1f0944755516569a1.zip
fix(extmarks): handle overwriting right half of wide char (#26951)
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/ui/decorations_spec.lua32
1 files changed, 31 insertions, 1 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 48df6b3295..4860009e38 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -2082,7 +2082,37 @@ describe('extmark decorations', function()
]]}
end)
- it('works with double width char and rightleft', function()
+ it('virtual text overwrites double-width char properly', function()
+ screen:try_resize(50, 3)
+ insert('abcdefghij口klmnopqrstu口vwx口yz')
+ feed('0')
+ meths.buf_set_extmark(0, ns, 0, 0, { virt_text = {{'!!!!!', 'Underlined'}}, virt_text_win_col = 11 })
+ screen:expect{grid=[[
+ ^abcdefghij {28:!!!!!}opqrstu口vwx口yz |
+ {1:~ }|
+ |
+ ]]}
+ feed('8x')
+ screen:expect{grid=[[
+ ^ij口klmnopq{28:!!!!!} vwx口yz |
+ {1:~ }|
+ |
+ ]]}
+ feed('3l5x')
+ screen:expect{grid=[[
+ ij口^pqrstu {28:!!!!!} yz |
+ {1:~ }|
+ |
+ ]]}
+ feed('5x')
+ screen:expect{grid=[[
+ ij口^u口vwx {28:!!!!!} |
+ {1:~ }|
+ |
+ ]]}
+ end)
+
+ it('virtual text works with double-width char and rightleft', function()
screen:try_resize(50, 3)
insert('abcdefghij口klmnopqrstu口vwx口yz')
feed('0')