aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-15 11:14:50 +0800
committerGitHub <noreply@github.com>2023-06-15 11:14:50 +0800
commitd81f78713b76e667491dba27ef6841f05d561d68 (patch)
tree73438eb0b6f484669aab042d64c3abd50d0c3103
parenta05bbc60eaf2d18cb117345becd9d2d13fa4ce4c (diff)
downloadrneovim-d81f78713b76e667491dba27ef6841f05d561d68.tar.gz
rneovim-d81f78713b76e667491dba27ef6841f05d561d68.tar.bz2
rneovim-d81f78713b76e667491dba27ef6841f05d561d68.zip
test(decorations_spec): add test for extmark case of #21486 (#24028)
-rw-r--r--test/functional/ui/decorations_spec.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 940974e0b0..91fbbe2579 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -1315,6 +1315,26 @@ describe('extmark decorations', function()
]])
end)
+ it('conceal works just before truncated double-width char #21486', function()
+ screen:try_resize(40, 4)
+ meths.buf_set_lines(0, 0, -1, true, {'', ('a'):rep(37) .. '<>古'})
+ meths.buf_set_extmark(0, ns, 1, 37, {end_col=39, conceal=''})
+ command('setlocal conceallevel=2')
+ screen:expect{grid=[[
+ ^ |
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa{1:>} |
+ 古 |
+ |
+ ]]}
+ feed('j')
+ screen:expect{grid=[[
+ |
+ ^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<>{1:>}|
+ 古 |
+ |
+ ]]}
+ end)
+
it('avoids redraw issue #20651', function()
exec_lua[[
vim.cmd.normal'10oXXX'