Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(manager): manager.update() never resolve when buf_check() fails
Problem: If `buf_check(...)` fails (mostly when cache is outdated), it would abort updating gitsigns, but this actually leads to the coroutine never resolving and stuck forever. It is because the asynchronous callback `cb()` is never called. As a result, gitsigns might be stuck forever and fail to update silently (see lewis6991#924), and manual reattach or refresh also doesn't work, because of the unresolved coroutine that is recognized to be "still running", i.e., any subsequent calls to "throttled" `manager.update()` will not be executed. Solution: Make `buf_check()` always yield a value (true/false) to ensure that `manager.update()` will resolve and finish its execution after all.
- Loading branch information