aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/decorations_spec.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index a4c024b526..fd8a06d898 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -39,6 +39,7 @@ describe('decorations providers', function()
[16] = {special = Screen.colors.Red, undercurl = true},
[17] = {foreground = Screen.colors.Red},
[18] = {bold = true, foreground = Screen.colors.SeaGreen};
+ [19] = {bold = true};
}
end)
@@ -738,6 +739,25 @@ describe('decorations providers', function()
|
]]}
end)
+
+ it('is not invoked repeatedly in Visual mode with vim.schedule() #20235', function()
+ exec_lua([[_G.cnt = 0]])
+ setup_provider([[
+ function on_do(event, ...)
+ if event == 'win' then
+ vim.schedule(function() end)
+ _G.cnt = _G.cnt + 1
+ end
+ end
+ ]])
+ feed('v')
+ screen:expect([[
+ ^ |
+ {1:~ }|*6
+ {19:-- VISUAL --} |
+ ]])
+ eq(2, exec_lua([[return _G.cnt]]))
+ end)
end)
local example_text = [[