aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-12-28 19:26:59 +0800
committerGitHub <noreply@github.com>2023-12-28 19:26:59 +0800
commit2b9d3869f8f366399327d01155f557e90038ca97 (patch)
treecc65d173dd07e1a5de324bfd4f9c214a21a63ccb /test
parent53a3e6ac879d89039c69d3e44f46ed9bf857a9d9 (diff)
downloadrneovim-2b9d3869f8f366399327d01155f557e90038ca97.tar.gz
rneovim-2b9d3869f8f366399327d01155f557e90038ca97.tar.bz2
rneovim-2b9d3869f8f366399327d01155f557e90038ca97.zip
fix(drawline): don't use temporary "v" variable when not needed (#26777)
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/decorations_spec.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index be0f41ef6b..d78d7d06cc 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -762,6 +762,8 @@ describe('extmark decorations', function()
[39] = {foreground = Screen.colors.Blue1, background = Screen.colors.LightCyan1, bold = true};
[40] = {reverse = true};
[41] = {bold = true, reverse = true};
+ [42] = {undercurl = true, special = Screen.colors.Red};
+ [43] = {background = Screen.colors.Yellow, undercurl = true, special = Screen.colors.Red};
}
ns = meths.create_namespace 'test'
@@ -1904,6 +1906,23 @@ describe('extmark decorations', function()
]])
end)
+ it('highlight works properly with multibyte text and spell #26771', function()
+ insert('口口\n')
+ screen:try_resize(50, 3)
+ meths.buf_set_extmark(0, ns, 0, 0, { end_col = 3, hl_group = 'Search' })
+ screen:expect([[
+ {34:口}口 |
+ ^ |
+ |
+ ]])
+ command('setlocal spell')
+ screen:expect([[
+ {43:口}{42:口} |
+ ^ |
+ |
+ ]])
+ end)
+
it('supports multiline highlights', function()
insert(example_text)
feed 'gg'