mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 05:35:10 -07:00
fix(extmarks): fix virt_text_hide with 'nowrap' and multibyte (#23757)
This commit is contained in:
parent
f733595e79
commit
a6dd67f5b6
@ -1729,7 +1729,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, int mod_top, bo
|
|||||||
wlv.draw_state = WL_LINE;
|
wlv.draw_state = WL_LINE;
|
||||||
if (has_decor && wlv.row == startrow + wlv.filler_lines) {
|
if (has_decor && wlv.row == startrow + wlv.filler_lines) {
|
||||||
// hide virt_text on text hidden by 'nowrap'
|
// hide virt_text on text hidden by 'nowrap'
|
||||||
decor_redraw_col(wp, wlv.vcol, wlv.off, true, &decor_state);
|
decor_redraw_col(wp, (colnr_T)(ptr - line), wlv.off, true, &decor_state);
|
||||||
}
|
}
|
||||||
win_line_continue(&wlv); // use wlv.saved_ values
|
win_line_continue(&wlv); // use wlv.saved_ values
|
||||||
}
|
}
|
||||||
|
@ -825,6 +825,26 @@ describe('extmark decorations', function()
|
|||||||
end -- ?古古古古?古古 |
|
end -- ?古古古古?古古 |
|
||||||
|
|
|
|
||||||
]]}
|
]]}
|
||||||
|
|
||||||
|
screen:try_resize(50, 2)
|
||||||
|
command('set nowrap')
|
||||||
|
meths.buf_set_lines(0, 12, 12, true, {'-- ' .. ('…'):rep(57)})
|
||||||
|
feed('G')
|
||||||
|
meths.buf_set_extmark(0, ns, 12, 123, { virt_text={{'!!!!!', 'ErrorMsg'}}, virt_text_pos='overlay', virt_text_hide=true})
|
||||||
|
screen:expect{grid=[[
|
||||||
|
^-- …………………………………………………………………………………………………………{4:!!!!!}……|
|
||||||
|
|
|
||||||
|
]]}
|
||||||
|
feed('40zl')
|
||||||
|
screen:expect{grid=[[
|
||||||
|
^………{4:!!!!!}……………………………… |
|
||||||
|
|
|
||||||
|
]]}
|
||||||
|
feed('10zl')
|
||||||
|
screen:expect{grid=[[
|
||||||
|
^………………………… |
|
||||||
|
|
|
||||||
|
]]}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('can have virtual text of overlay position and styling', function()
|
it('can have virtual text of overlay position and styling', function()
|
||||||
|
Loading…
Reference in New Issue
Block a user