fix(ui): fix tabs not being spaced properly after virtual text with no wrap

also fixes incorrect skipping of multibyte characters
This commit is contained in:
Ibby
2023-04-12 18:21:46 +10:00
committed by bfredl
parent 7423d3479d
commit 5d7afb2e9f
3 changed files with 63 additions and 6 deletions

View File

@@ -1793,6 +1793,31 @@ bbbbbbb]])
|
]]}
end)
it('tabs are the correct length with no wrap following virtual text', function()
command('set nowrap')
feed('itest<TAB>a<ESC>')
meths.buf_set_extmark(0, ns, 0, 0,
{ virt_text = { { string.rep('a', 55), 'Special' } }, virt_text_pos = 'inline' })
feed('gg$')
screen:expect { grid = [[
{28:aaaaaaaaaaaaaaaaaaaaaaaaa}test ^a |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
|
]]}
end)
end)
describe('decorations: virtual lines', function()