aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2022-10-14 20:46:26 +0100
committerGitHub <noreply@github.com>2022-10-14 20:46:26 +0100
commitcb7da02701d542d3c1618f44f6217944986f09f9 (patch)
treec85f76108cafd55733f8f56ab13081cb55bdb286 /test/functional
parente6f7e038b8bbca487e78ebfc6fe21d6852330623 (diff)
parent546b294e74ac10d0a5e1216dd530fc96bdc66f29 (diff)
downloadrneovim-cb7da02701d542d3c1618f44f6217944986f09f9.tar.gz
rneovim-cb7da02701d542d3c1618f44f6217944986f09f9.tar.bz2
rneovim-cb7da02701d542d3c1618f44f6217944986f09f9.zip
Merge pull request #20645 from lewis6991/fix/decor_redraw_same_id
fix(decoration): redraw correctly when re-using ids
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/ui/decorations_spec.lua35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 0a5eefbf38..9448674a41 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -2085,4 +2085,39 @@ describe('decorations: virt_text', function()
]]}
end)
+ it('redraws correctly when re-using extmark ids', function()
+ command 'normal 5ohello'
+
+ screen:expect{grid=[[
+ |
+ hello |
+ hello |
+ hello |
+ hello |
+ hell^o |
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ |
+ ]]}
+
+ local ns = meths.create_namespace('ns')
+ for row = 1, 5 do
+ meths.buf_set_extmark(0, ns, row, 0, { id = 1, virt_text = {{'world', 'Normal'}} })
+ end
+
+ screen:expect{grid=[[
+ |
+ hello |
+ hello |
+ hello |
+ hello |
+ hell^o world |
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ |
+ ]]}
+ end)
+
end)