Skip to content

Commit

Permalink
fix(watcher): workaround weird annoying libuv bug
Browse files Browse the repository at this point in the history
Fixes #1027
  • Loading branch information
lewis6991 committed Jun 6, 2024
1 parent 379a5a9 commit 1647dfc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/gitsigns.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ local update_cwd_head = async.create(function()

if cwd_watcher then
cwd_watcher:stop()
-- TODO(lewis6991): (#1027) Running fs:_event:stop() -> fs_event:start() in
-- the same loop event, on Windows, causes Nvim to hang on quit.
if vim.fn.has('win32') then
async.scheduler()
end
else
cwd_watcher = assert(uv.new_fs_event())
end
Expand Down

0 comments on commit 1647dfc

Please sign in to comment.