Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#1451 caught an error caused by swap files and produced an error message that heavily suggested the error was caused by swap and could be ignored when that was never confirmed. Some concern was raised about this approach, and an additional cases of the same bug was found...
So this PR checks the error message (via pattern match) to confirm that a swap error was the cause of
vim.cmd.edit
failing, and in these cases eats the error message. It's okay (and I'd say preferred) to eat this error b/c a lengthy swap message will pop up on screen for the user, so users will not be confused about what's happening.In case the error is not caused be swap, it's now re-raised with the exact error message.
#1451 handled the edit call in
:Neorg index
, this pr additionally handles a call in the hop module when following a link that's opened in nvim.