diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-05-31 06:50:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-31 06:50:37 +0800 |
commit | 7e3ff8afa435607c703706a99cf9006893bdb399 (patch) | |
tree | 42e659a37413d1b0f5b90a8a5768e6a6ec725359 | |
parent | 58618d208acd3827c4e86668529edb619bb9b8dd (diff) | |
download | rneovim-7e3ff8afa435607c703706a99cf9006893bdb399.tar.gz rneovim-7e3ff8afa435607c703706a99cf9006893bdb399.tar.bz2 rneovim-7e3ff8afa435607c703706a99cf9006893bdb399.zip |
test(extmarks): folding inline virt_text on empty line (#23847)
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 975da35355..2d0223dec7 100644 --- 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) |