diff options
Diffstat (limited to 'test/functional/ui/decorations_spec.lua')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 307f750175..2f5ef790f1 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -838,6 +838,26 @@ describe('decorations providers', function() | ]]) end) + + it('decor provider is enabled again for next redraw after on_win disabled it', function() + exec_lua(function() + vim.api.nvim_set_decoration_provider(vim.api.nvim_create_namespace(''), { + on_win = function() + return false + end, + on_buf = function() + _G.did_buf = (_G.did_buf or 0) + 1 + end, + }) + end) + api.nvim_buf_set_lines(0, 0, -1, false, { 'foo' }) + screen:expect([[ + ^foo | + {1:~ }|*6 + | + ]]) + eq(1, exec_lua('return _G.did_buf')) + end) end) describe('decoration_providers', function() |