aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-28 17:29:44 +0800
committerGitHub <noreply@github.com>2023-05-28 17:29:44 +0800
commit9c41a81dec15ced3f66723b8aa87c2438a099128 (patch)
tree6fb822d0e050287640f857565440e2a93a977114 /test
parent4dd43e31db8fa23b5189e074cff94f1491035aac (diff)
downloadrneovim-9c41a81dec15ced3f66723b8aa87c2438a099128.tar.gz
rneovim-9c41a81dec15ced3f66723b8aa87c2438a099128.tar.bz2
rneovim-9c41a81dec15ced3f66723b8aa87c2438a099128.zip
fix(extmarks): fix virt_text_hide off-by-one hiding (#23795)
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/decorations_spec.lua15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 4960a1d3ed..975da35355 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -837,9 +837,10 @@ describe('extmark decorations', function()
screen:try_resize(50, 3)
command('set nowrap')
meths.buf_set_lines(0, 0, -1, true, {'-- ' .. ('…'):rep(57)})
+ meths.buf_set_extmark(0, ns, 0, 0, { virt_text={{'?????', 'ErrorMsg'}}, virt_text_pos='overlay', virt_text_hide=true})
meths.buf_set_extmark(0, ns, 0, 123, { virt_text={{'!!!!!', 'ErrorMsg'}}, virt_text_pos='overlay', virt_text_hide=true})
screen:expect{grid=[[
- ^-- …………………………………………………………………………………………………………{4:!!!!!}……|
+ {4:^?????}……………………………………………………………………………………………………{4:!!!!!}……|
{1:~ }|
|
]]}
@@ -849,7 +850,13 @@ describe('extmark decorations', function()
{1:~ }|
|
]]}
- feed('10zl')
+ feed('3zl')
+ screen:expect{grid=[[
+ {4:^!!!!!}……………………………… |
+ {1:~ }|
+ |
+ ]]}
+ feed('7zl')
screen:expect{grid=[[
^………………………… |
{1:~ }|
@@ -858,7 +865,7 @@ describe('extmark decorations', function()
command('set wrap smoothscroll')
screen:expect{grid=[[
- -- …………………………………………………………………………………………………………{4:!!!!!}……|
+ {4:?????}……………………………………………………………………………………………………{4:!!!!!}……|
^………………………… |
|
]]}
@@ -876,7 +883,7 @@ describe('extmark decorations', function()
]]}
feed('<C-Y>')
screen:expect{grid=[[
- -- …………………………………………………………………………………………………|
+ {4:?????}……………………………………………………………………………………………|
………{4:!!!!!}……………………………^… |
|
]]}