aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/multibyte_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-26 11:52:52 +0800
committerGitHub <noreply@github.com>2023-06-26 11:52:52 +0800
commitcd6458123fb4859e47ffcd144ebbddf389a09610 (patch)
tree2736d361fc1e6a9a4f19b8d87f93ad3197fb80f4 /test/functional/ui/multibyte_spec.lua
parent91aeaeef64da56b1cce37a04b86e831241ce7ff9 (diff)
downloadrneovim-cd6458123fb4859e47ffcd144ebbddf389a09610.tar.gz
rneovim-cd6458123fb4859e47ffcd144ebbddf389a09610.tar.bz2
rneovim-cd6458123fb4859e47ffcd144ebbddf389a09610.zip
fix(charset): fix wrong display of 0xffff (#24158)
Diffstat (limited to 'test/functional/ui/multibyte_spec.lua')
-rw-r--r--test/functional/ui/multibyte_spec.lua16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/functional/ui/multibyte_spec.lua b/test/functional/ui/multibyte_spec.lua
index 9f413f8bff..5cecd423d7 100644
--- a/test/functional/ui/multibyte_spec.lua
+++ b/test/functional/ui/multibyte_spec.lua
@@ -17,10 +17,11 @@ describe("multibyte rendering", function()
screen = Screen.new(60, 6)
screen:attach({rgb=true})
screen:set_default_attr_ids({
- [1] = {bold = true, foreground = Screen.colors.Blue1},
+ [1] = {bold = true, foreground = Screen.colors.Blue},
[2] = {background = Screen.colors.WebGray},
[3] = {background = Screen.colors.LightMagenta},
[4] = {bold = true},
+ [5] = {foreground = Screen.colors.Blue},
})
end)
@@ -119,6 +120,19 @@ describe("multibyte rendering", function()
]])
end)
+ it('0xffff is shown as 4 hex digits', function()
+ command([[call setline(1, "\uFFFF!!!")]])
+ feed('$')
+ screen:expect{grid=[[
+ {5:<ffff>}!!^! |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
+ end)
+
it('works with a lot of unicode (zalgo) text', function()
screen:try_resize(65, 10)
meths.buf_set_lines(0,0,-1,true, split(dedent [[