diff options
author | Ibby <33922797+SleepySwords@users.noreply.github.com> | 2023-04-03 01:05:08 +1000 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2023-05-22 13:49:42 +0200 |
commit | 1936285d98f62a1357abf928b10c824cf9e3ff41 (patch) | |
tree | e27a23c34754ad3e55a2be8561a6b516119f9093 /test | |
parent | be273c3a23cf65665e843cfb13fd5319657cc5c2 (diff) | |
download | rneovim-1936285d98f62a1357abf928b10c824cf9e3ff41.tar.gz rneovim-1936285d98f62a1357abf928b10c824cf9e3ff41.tar.bz2 rneovim-1936285d98f62a1357abf928b10c824cf9e3ff41.zip |
fix(ui): fixes incorrect rendering when virtual text is not visable and nowrap
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index de3f7e7a5b..68c0e5eaca 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -1741,6 +1741,33 @@ bbbbbbb]]) {24:-- INSERT --} | ]]} end) + + it('no wrap is rendered correctly with multiple virtual text, where one is hidden', function() + insert('abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz') + command("set nowrap") + meths.buf_set_extmark(0, ns, 0, 50, + { virt_text = { { 'virtual text', 'Special' } }, virt_text_pos = 'inline', right_gravity = false }) + meths.buf_set_extmark(0, ns, 0, 2, + { virt_text = { { 'virtual text', 'Special' } }, virt_text_pos = 'inline', right_gravity = false }) + feed('$') + screen:expect { grid = [[ + opqrstuvwxyzabcdefghijklmnopqrstuvwx{28:virtual text}y^z| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]} + end) end) describe('decorations: virtual lines', function() |