aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-11-28 11:01:21 +0100
committerGitHub <noreply@github.com>2023-11-28 11:01:21 +0100
commitba564442ae5e8793f54d401fc636194df48cad3d (patch)
tree6595afdc29f0f0a1e7057373a14e5b121e41ae41 /test
parent71e954ad303eec25b67541f3a99392446f6de8b3 (diff)
parentae3685798deaf51f14422c568998998c03f91f2c (diff)
downloadrneovim-ba564442ae5e8793f54d401fc636194df48cad3d.tar.gz
rneovim-ba564442ae5e8793f54d401fc636194df48cad3d.tar.bz2
rneovim-ba564442ae5e8793f54d401fc636194df48cad3d.zip
Merge pull request #26249 from bfredl/concealchar
feat(decoration): allow conceal_char to be a composing char
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/decorations_spec.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 9853f05cf2..ef02f73960 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -13,6 +13,7 @@ local curbufmeths = helpers.curbufmeths
local command = helpers.command
local eq = helpers.eq
local assert_alive = helpers.assert_alive
+local pcall_err = helpers.pcall_err
describe('decorations providers', function()
local screen
@@ -1650,6 +1651,34 @@ describe('extmark decorations', function()
]])
command('set conceallevel=1')
screen:expect_unchanged()
+
+ eq("conceal char has to be printable", pcall_err(meths.buf_set_extmark, 0, ns, 0, 0, {end_col=0, end_row=2, conceal='\255'}))
+ end)
+
+ it('conceal with composed conceal char', function()
+ screen:try_resize(50, 5)
+ insert('foo\n')
+ meths.buf_set_extmark(0, ns, 0, 0, {end_col=0, end_row=2, conceal='ẍ̲'})
+ command('set conceallevel=2')
+ screen:expect([[
+ {26:ẍ̲} |
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ |
+ ]])
+ command('set conceallevel=1')
+ screen:expect_unchanged()
+
+ -- this is rare, but could happen. Save at least the first codepoint
+ meths._invalidate_glyph_cache()
+ screen:expect{grid=[[
+ {26:x} |
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
end)
it('conceal without conceal char #24782', function()