Skip to content

Commit

Permalink
fix: use vim.loop for nvim 0.9 in view/init.lua (#487)
Browse files Browse the repository at this point in the history
Follow-up of #418,
#416

Without this fix the plugin doesn't work at all on nvim 0.9.5
  • Loading branch information
Logarithmus committed Jun 6, 2024
1 parent f13e65a commit 791278e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/trouble/view/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ M._last = {}

M.MOVING_DELAY = 4000

local uv = vim.loop or vim.uv

---@param opts trouble.Mode
function M.new(opts)
local self = setmetatable({}, M)
Expand Down Expand Up @@ -81,8 +83,8 @@ function M.new(opts)
self:listen()
self:refresh()
end
self.moving = vim.uv.new_timer()
self.clicked = vim.uv.new_timer()
self.moving = uv.new_timer()
self.clicked = uv.new_timer()
return self
end

Expand Down

0 comments on commit 791278e

Please sign in to comment.