Fixed
- Visual mode cursor displaced at end-of-line (regression) — exiting charwise visual mode (
v$<Esc>,vlll<Esc>) at end-of-line left the cursor one position past the last character. The fork'sexitVisualMode()calledclipCursorToContent()whilevim.visualModewas stilltrue, which allowed the cursor to land at the linebreak position; after clearing the flag, the cursor remained displaced. Fixed by clearing visual flags beforesetCursor. Also fixed a latent JS loose equality bug inmeasureCursor()wherefalse != "\n"evaluated tofalsedue to type coercion. (#15) - Leader key mappings not working via vimrc —
let mapleader = ","(or space, or any custom leader) in.obsidian.vimrcnow correctly re-registers EasyMotion, hint mode, table manipulation, and settings leader bindings with the new leader key. Previously, the initial backslash-leadermapCommandentries persisted in the keymap becauseVim.unmap()could not removemapCommand-created entries, andunmapDefaultBindingskipped non-special keys like comma. The fork now providesVim.removeMapCommand(keys)for clean removal, andVimRegistrationuses scoped leader binding tracking to selectively unregister stale bindings when the leader changes. (#21, #6) <C-w>workspace commands not working —<C-w>v,<C-w>h/j/k/l,<C-w>s,<C-w>c/q, and<C-w>onow work correctly when Obsidian's default Ctrl+W hotkey is unbound. The fork'smatchCommandhad anidleentry for<C-w>in normal mode that consumed the key as a no-op before the second keystroke could arrive, preventing multi-key<C-w>Xsequences from matching. The fork now deprioritizesidlefull matches when more-specific partial matches exist (e.g.<C-w>v,<C-w>hregistered viamapCommand). Theidleentry still fires when no sub-commands are registered, preventing the keystroke from propagating to the browser. (#20)
Added
- Fork regression test
exit_visual_mode_cursor_clippingcoveringvlll<Esc>,vll<Esc>, andv$<Esc>cursor positioning - E2E tests for leader key mapping behavior: comma and space leader key mappings execute correctly via
Vim.handleKey, leader keys do not insert literal characters in normal mode, EasyMotion overlay appears with custom leader and old leader bindings are cleaned up - E2E tests for
<C-w>workspace commands:<C-w>v/<C-w>sverify leaf count increases (split created),<C-w>cverifies leaf count decreases (tab closed),<C-w>overifies other tabs closed,<C-w>h/j/k/lverify focus changes after split,<C-w>followed by invalid suffix (x) verifies the suffix does not execute as a standalone command, insert-mode<C-w>non-regression verifies delete-word still works
Documentation
KNOWN_LIMITATIONS.md: updated "Visual mode cursor displaced at end-of-line" section withexitVisualModeroot cause andmeasureCursorcoercion fixDIFFERENCES.md(fork): updated "Visual mode cursor positioning at EOL" section withexitVisualModeordering fix and strict equality fixKNOWN_LIMITATIONS.md: expanded "EasyMotion leader key conflict" fixed section with leader re-registration andremoveMapCommanddetailsKNOWN_LIMITATIONS.md: updated "<C-w>prefix conflict" section — removed codemirror-vim limitation framing, kept user-action requirement (unbind Obsidian's Ctrl+W hotkey)DIFFERENCES.md(fork): added "removeMapCommandAPI" section documenting the new keymap removal methodDIFFERENCES.md(fork): added "Idle key deprioritization for multi-key sequences" section documenting thematchCommandfix
Full Changelog: 0.16.0...0.17.0