mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(decor): don't draw invalidated virtual lines (#29858)
This commit is contained in:
parent
41b70a0dea
commit
5af9c065ad
@ -924,7 +924,7 @@ int decor_virt_lines(win_T *wp, linenr_T lnum, VirtLines *lines, TriState has_fo
|
||||
while (true) {
|
||||
MTKey mark = marktree_itr_current(itr);
|
||||
DecorVirtText *vt = mt_decor_virt(mark);
|
||||
if (ns_in_win(mark.ns, wp)) {
|
||||
if (!mt_invalid(mark) && ns_in_win(mark.ns, wp)) {
|
||||
while (vt) {
|
||||
if (vt->flags & kVTIsLines) {
|
||||
bool above = vt->flags & kVTLinesAbove;
|
||||
|
@ -4948,6 +4948,28 @@ if (h->n_buckets < new_n_buckets) { // expand
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
it('not drawn when invalid', function()
|
||||
api.nvim_buf_set_lines(0, 0, -1, false, { 'foo', 'bar' })
|
||||
api.nvim_buf_set_extmark(0, ns, 0, 0, { virt_lines = {{{'VIRT1'}}}, invalidate = true })
|
||||
screen:expect({
|
||||
grid = [[
|
||||
^foo |
|
||||
VIRT1 |
|
||||
bar |
|
||||
{1:~ }|*8
|
||||
|
|
||||
]]
|
||||
})
|
||||
feed('dd')
|
||||
screen:expect({
|
||||
grid = [[
|
||||
^bar |
|
||||
{1:~ }|*10
|
||||
|
|
||||
]]
|
||||
})
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('decorations: signs', function()
|
||||
|
Loading…
Reference in New Issue
Block a user