diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-02-16 22:05:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-16 14:05:13 +0000 |
commit | 84520325547d6ab3a047a09b5a0e55e8b216a9fb (patch) | |
tree | f301872e208ea39883a05c24f4f56117de09de1f /test/functional/ui/decorations_spec.lua | |
parent | efe92f9dff9383cf78a2d0c857448a14514c7043 (diff) | |
download | rneovim-84520325547d6ab3a047a09b5a0e55e8b216a9fb.tar.gz rneovim-84520325547d6ab3a047a09b5a0e55e8b216a9fb.tar.bz2 rneovim-84520325547d6ab3a047a09b5a0e55e8b216a9fb.zip |
fix(marks): handle double-with inline virt_text with 'nowrap' (#32476)
Diffstat (limited to 'test/functional/ui/decorations_spec.lua')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 7969dd5d3b..fb2e6ea65f 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -3375,6 +3375,86 @@ describe('decorations: inline virtual text', function() ]]} end) + it('draws correctly with no wrap and multibyte virtual text', function() + insert('12345678') + command('set nowrap') + api.nvim_buf_set_extmark(0, ns, 0, 2, { + virt_text = { { 'αβγ口=', 'Special' }, { '口', 'Special' } }, + virt_text_pos = 'inline', + }) + screen:expect([[ + 12{10:αβγ口=口}34567^8 | + {1:~ }| + | + ]]) + feed('zl') + screen:expect([[ + 2{10:αβγ口=口}34567^8 | + {1:~ }| + | + ]]) + feed('zl') + screen:expect([[ + {10:αβγ口=口}34567^8 | + {1:~ }| + | + ]]) + feed('zl') + screen:expect([[ + {10:βγ口=口}34567^8 | + {1:~ }| + | + ]]) + feed('zl') + screen:expect([[ + {10:γ口=口}34567^8 | + {1:~ }| + | + ]]) + feed('zl') + screen:expect([[ + {10:口=口}34567^8 | + {1:~ }| + | + ]]) + feed('zl') + screen:expect([[ + {10: =口}34567^8 | + {1:~ }| + | + ]]) + feed('zl') + screen:expect([[ + {10:=口}34567^8 | + {1:~ }| + | + ]]) + feed('zl') + screen:expect([[ + {10:口}34567^8 | + {1:~ }| + | + ]]) + feed('zl') + screen:expect([[ + {10: }34567^8 | + {1:~ }| + | + ]]) + feed('zl') + screen:expect([[ + 34567^8 | + {1:~ }| + | + ]]) + feed('zl') + screen:expect([[ + 4567^8 | + {1:~ }| + | + ]]) + end) + it('tabs are the correct length with no wrap following virtual text', function() command('set nowrap') feed('itest<TAB>a<ESC>') |