commit 7e3ff8afa435607c703706a99cf9006893bdb399
parent 58618d208acd3827c4e86668529edb619bb9b8dd
Author: zeertzjq <zeertzjq@outlook.com>
Date: Wed, 31 May 2023 06:50:37 +0800
test(extmarks): folding inline virt_text on empty line (#23847)
Diffstat:
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
@@ -2227,34 +2227,55 @@ bbbbbbb]])
end)
it('does not crash at column 0 when folded in a wide window', function()
- screen:try_resize(82, 4)
+ screen:try_resize(82, 5)
command('hi! CursorLine guibg=NONE guifg=Red gui=NONE')
command('set cursorline')
insert([[
aaaaa
bbbbb
+
ccccc]])
meths.buf_set_extmark(0, ns, 0, 0, { virt_text = {{'foo'}}, virt_text_pos = 'inline' })
+ meths.buf_set_extmark(0, ns, 2, 0, { virt_text = {{'bar'}}, virt_text_pos = 'inline' })
screen:expect{grid=[[
fooaaaaa |
bbbbb |
+ bar |
{16:cccc^c }|
|
]]}
command('1,2fold')
screen:expect{grid=[[
{17:+-- 2 lines: aaaaa·······························································}|
+ bar |
{16:cccc^c }|
{1:~ }|
|
]]}
- feed('k')
+ feed('2k')
screen:expect{grid=[[
{18:^+-- 2 lines: aaaaa·······························································}|
+ bar |
ccccc |
{1:~ }|
|
]]}
+ command('3,4fold')
+ screen:expect{grid=[[
+ {18:^+-- 2 lines: aaaaa·······························································}|
+ {17:+-- 2 lines: ccccc·······························································}|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
+ feed('j')
+ screen:expect{grid=[[
+ {17:+-- 2 lines: aaaaa·······························································}|
+ {18:^+-- 2 lines: ccccc·······························································}|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]]}
end)
end)