Skip to content

Commit

Permalink
fix: nvim_echo may not be called in a lua loop callback
Browse files Browse the repository at this point in the history
I'm unsure why this is the root cause of the problem, but hey this fixes
it in every case I've thrown at it...
  • Loading branch information
vhyrro committed Oct 20, 2023
1 parent 525084f commit a3b9a7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/rocks/state.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ state.rock_dependencies = nio.create(function(rock)
"--deps",
"--porcelain",
rock.name,
}, function(obj)
}, vim.schedule_wrap(function(obj)
-- TODO: Error handling
future.set(obj.stdout)
end, { text = true })
end, { text = true }))

local dependency_list = future.wait()

Expand Down

0 comments on commit a3b9a7c

Please sign in to comment.