-
-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(blame): fix possible race condition
It is possible for the buffer to change during the async function. To avoid this, before applying the extmark, check that the cursor is in the same position. If it is the extmark should be ok to apply and at the very least will avoid the `line value outside range` error. Fixes #312
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Should this also check that
current_buf() == bufnr
in case the cursor is on the same line of a different buffer when the async function returns?