Skip to content

Commit

Permalink
fix(promise): vim.loop. Fixes #513
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 19, 2024
1 parent 58a3acf commit 1acfb6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/trouble/promise.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ end

function P:timeout(ms)
return P.new(function(resolve, reject)
local timer = vim.loop.new_timer()
local timer = (vim.uv or vim.loop).new_timer()
timer:start(ms, 0, function()
timer:close()
vim.schedule(function()
Expand Down

0 comments on commit 1acfb6c

Please sign in to comment.