Fix not updated links on multiple file insert when AutoRename is enabled #86
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.
I use this plugin with "AutoRename" and "Handle all attachments" on. It works great so far, thanks a lot for it.
However, when I drag and drop multiple files at once in a note, the files were renamed correctly, but the links in the target note weren't updated but the last. This was seemingly due to the asynchronous behaviour of the functions: When the renameFile function fetched the cursor, it was already on a new position behind another inserted link due to the batch insert. Thus, it was not possible to locate and replace the link.
Getting the cursor on time of the event trigger fixed it for me.