mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
fix(ui): fix overflowing nowrap virtual text not displaying if tab follows
This commit is contained in:
parent
34d862942c
commit
a37c990483
@ -1799,6 +1799,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool nochange,
|
||||
area_attr = 0;
|
||||
extmark_attr = 0;
|
||||
virt_inline_i++;
|
||||
n_skip = 0;
|
||||
// If the text didn't reach until the first window
|
||||
// column we need to skip cells.
|
||||
if (skip_cells > 0) {
|
||||
|
@ -1983,6 +1983,38 @@ bbbbbbb]])
|
||||
|
|
||||
]]}
|
||||
end)
|
||||
|
||||
it('correctly draws when overflowing virtual text is followed by tab with no wrap', function()
|
||||
command('set nowrap')
|
||||
feed('i<TAB>test<ESC>')
|
||||
meths.buf_set_extmark(
|
||||
0,
|
||||
ns,
|
||||
0,
|
||||
0,
|
||||
{ virt_text = { { string.rep('a', 60), 'Special' } }, virt_text_pos = 'inline' }
|
||||
)
|
||||
feed('0')
|
||||
screen:expect({
|
||||
grid = [[
|
||||
{28:aaaaaaaaaaaaaaaaaaaaaa} ^ test |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
|
|
||||
]],
|
||||
})
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('decorations: virtual lines', function()
|
||||
|
Loading…
Reference in New Issue
Block a user