Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix not updated links on multiple file insert when AutoRename is enabled #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

s-blu
Copy link

@s-blu s-blu commented Jan 22, 2024

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.

when doing so while renaming, the cursor position already updated by inserting following dropped links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant