feature: destroy markers if current key matches with no current marker characters #7
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.
Chrome Vimium destroys all markers if the current key matches with no current marker characters
Given following circumstances, for example,
if the current
event.key
is 'e' which does not match with any of the current marker characters ('b', 'c', 'd'),the marker should disappear and also be disabled.
Unfortunately, existing code in obsidian vimium does make the markers disappear but not disable them.
This leads to an issue where no keyboard input works at all, that is, disabling any [a-zA-Z] keyboard inputs due to
event.preventDefault();
.This PR aims to mitigate this issue and align with Chrome Vimium.
This PR checks if the current
event.key
matches with any of currenct marker characters and if so, marker is not only destroyed but also disabled.