0.142.0
Fixed
:obcommandvia vim mapping in visual mode loses selection — when a user maps a visual-mode key to:obcommand editor:toggle-bullet-list(or any selection-dependent Obsidian command) viaexmap+vmap, the command operates on only the cursor line instead of all selected lines. Root cause: the codemirror-vim fork'sExCommandDispatcher._processCommand()exits visual mode before executing the ex command handler, so by the time:obcommandcallsexecuteCommandById(), the CM6 selection is collapsed. Fixed by reading the visual range fromparams.selectionLine/params.selectionLineEnd(set byparseInput_beforeexitVisualMode) and falling back to the'</'>vim marks for theexmapindirection path where the inner_processCommandno longer has visual mode context. The CM6 selection is expanded to the visual range before the Obsidian command executes. (#161)- Plugin:
src/workspace/commands.ts(addedgetVisualRange()andexpandSelectionFromRange()increateObCommand) - Plugin:
src/types/vim-api.d.ts(addedselectionLine/selectionLineEndtoExCommandArgs)
- Plugin:
Tests
- 3 e2e tests in
test/specs/obcommand-visual-mode.e2e.tsfor #161 (directhandleExbullet toggle,defineExexmap indirection, numbered list variant — all in visual-line mode)
Documentation
CHANGELOG.mdKNOWN_LIMITATIONS.md: updated Obsidian command passthrough section with ex command path fix
Full Changelog: 0.141.0...0.142.0