commit 4ef9dcb1eb7d969687872699d92e0860f3c9ff3a
parent 71e133e5e66a3346ac57bb3287f0ca95dde8ffec
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri, 4 Apr 2025 09:19:13 +0800
test(lua/hl_spec): fix hang on exit with ASAN (#33298)
Diffstat:
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git 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)