diff options
-rw-r--r-- | test/functional/lua/hl_spec.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/functional/lua/hl_spec.lua b/test/functional/lua/hl_spec.lua index e3c6c706c7..f17442912a 100644 --- a/test/functional/lua/hl_spec.lua +++ b/test/functional/lua/hl_spec.lua @@ -258,9 +258,9 @@ describe('vim.hl.on_yank', function() eq({ win }, api.nvim__ns_get(ns).wins) command('wincmd w') eq({ win }, api.nvim__ns_get(ns).wins) - -- Use a new vim.hl.range() call to cancel the previous timer + -- Use a new vim.hl.on_yank() call to cancel the previous timer exec_lua(function() - vim.hl.range(0, ns, 'Search', { 0, 0 }, { 0, 0 }, { timeout = 0 }) + vim.hl.on_yank({ timeout = 0, on_macro = true, event = { operator = 'y' } }) end) end) @@ -283,9 +283,9 @@ describe('vim.hl.on_yank', function() eq({ win }, api.nvim__ns_get(ns).wins) command('wincmd w') eq({ win }, api.nvim__ns_get(ns).wins) - -- Use a new vim.hl.range() call to cancel the previous timer + -- Use a new vim.hl.on_yank() call to cancel the previous timer exec_lua(function() - vim.hl.range(0, ns, 'Search', { 0, 0 }, { 0, 0 }, { timeout = 0 }) + vim.hl.on_yank({ timeout = 0, on_macro = true, event = { operator = 'y' } }) end) end) @@ -320,5 +320,9 @@ describe('vim.hl.on_yank', function() {1:~ }| | ]]) + -- Use a new vim.hl.on_yank() call to cancel the previous timer + exec_lua(function() + vim.hl.on_yank({ timeout = 0, on_macro = true, event = { operator = 'y' } }) + end) end) end) |