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

Hotkey assignments lost if a command is edited #3

Closed
pjeby opened this issue Oct 5, 2021 · 1 comment
Closed

Hotkey assignments lost if a command is edited #3

pjeby opened this issue Oct 5, 2021 · 1 comment

Comments

@pjeby
Copy link
Contributor

pjeby commented Oct 5, 2021

The code in URIModal sets a new ID for a command each time it's edited, instead of only assigning an ID once, when the command is first created. This causes hotkey assignments to be lost, because Obsidian stores them by command ID. So every time you edit a command, you have to go back and re-assign a hotkey to it, and the old hotkey assignments will accumulate in Obsidian's hotkeys.json.

The fix would be to move the ID assignment into the if branch for creating a new command, so that once it is created, a command will always have the same ID.

@kzhovn
Copy link
Owner

kzhovn commented Oct 5, 2021

Fixed in 0.4.3.

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

No branches or pull requests

2 participants