From 5af9c065ada5600a076e24ca899da38b299c81e6 Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Fri, 26 Jul 2024 03:04:17 +0200 Subject: fix(decor): don't draw invalidated virtual lines (#29858) --- test/functional/ui/decorations_spec.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test') diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index eda95b8991..c86b68994d 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -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() -- cgit