obsidian-vimrc-support icon indicating copy to clipboard operation
obsidian-vimrc-support copied to clipboard

Several fixes to CodeMirror event registration

Open Andr3wD opened this issue 2 years ago • 0 comments

Fixed problem with the chord display only keeping track of one CodeMirror instance. Previously, chords would only be tracked in one CodeMirror instance.

Fixed problem with surround command surrounding text in incorrect locations (related: #39). Previously, selections wouldn't update in any other instance than the main CodeMirror instance, causing the surround excommand to surround incorrect text. Now the selections are updated across multiple CodeMirror instances.

Both fixes applied by wrapping the CodeMirror event registers in registerCodeMirror() so that all future CodeMirror instances will be registered to the events (cursorActivity, vim-mode-change, vim-keypress, and vim-command-done when applicable).

Andr3wD avatar Oct 21 '21 04:10 Andr3wD