Fixed
- Obsidian commands only affect cursor line in visual-line mode (all invocation paths) — the previous fix (0.31.0, fork-side) only covered keyboard events that vim didn't handle: it expanded the CM6 selection in the fork's
handleKeyduring the bubble phase. However, Obsidian'sKeymapregisters its keydown listener onwindowin the capture phase (addEventListener("keydown", handler, true)), which fires before CM6's bubble-phase handler — so commands triggered via Obsidian hotkeys executed with cursor-only selection before the fork could expand it. Additionally, commands invoked viaexecuteCommandById(command palette, toolbar buttons, other plugins) bypassed the DOM event path entirely. Spike test confirmed:editor:toggle-numbered-list,editor:toggle-bullet-list,editor:toggle-bold, andeditor:indent-listall affected only 1 line regardless of invocation method. Fixed by wrappingapp.commands.executeCommandviaaround()to temporarily expand the CM6 selection to the full linewise range fromvim.selbefore any Obsidian command executes, then restoring cursor-only after. Covers all invocation paths: hotkeys, command palette, toolbar, and programmaticexecuteCommandById. (#41)- Plugin:
src/vim/visual-line-command-fix.ts—installVisualLineCommandFix()wrapsapp.commands.executeCommandusing the existingaround()utility (safe for multi-plugin stacking); installed inonload(), cleaned up inonunload() - Spike test:
test/specs/spikes/spike23-visual-line-hotkey-commands.e2e.ts— 10 tests verifying direct command, hotkey, and selection state behavior
- Plugin:
Full Changelog: 0.32.0...0.33.0