test(lua/hl_spec): fix hang on exit with ASAN (#33298)

This commit is contained in:
zeertzjq
2025-04-04 09:19:13 +08:00
parent 1a2d0484ac
commit c6ef13dc45

View File

@ -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)