github saberzero1/motions 0.43.0

latest releases: 1.4.0, 1.3.1, 1.3.0...
3 months ago

Fixed

  • Cursor snapping over double-character formatting marks in Live Preview — moving through **bold**, __underline__, ~~strikethrough~~, or ==highlight== with h/l skipped positions inside the **/__/~~/== delimiters instead of visiting each character. The cursor would jump from the first delimiter character to the content, skipping the second delimiter character. Investigation found that the EditorState.transactionFilter introduced to correct cursor positioning near formatting marks was the sole cause of the snapping — Obsidian's Live Preview natively handles mark visibility based on cursor proximity, and all formatting marks are full-width DOM elements on the active line. The transaction filter, the formattingMarkMode setting, and the formattingmarkmode vim option have been removed. (#33)
    • Plugin: removed src/vim/formatting-mark-fix.ts, src/vim/formatting-mark-ranges.ts; removed formattingMarkMode from settings interface, defaults, settings UI, Style Settings definition, vimrc loader, and vim options
  • gk/gj still skips lines in documents with mixed headings and lists — gk could jump over multiple document lines when navigating upward through a document containing headings of varying sizes (###, ####) separated by empty lines. The previous fix (v0.18.0) only clamped multi-line jumps when a replaced widget decoration (dec.point) was present in the skipped range, so headings — which use mark decorations with larger fonts, not replaced widgets — still triggered overshooting from CM6's pixel-based moveVertically. The fork's findPosV now clamps all multi-document-line jumps to ±1 when no fold is present, regardless of decoration type. posAtCoords resolves horizontal position on the clamped target line; the goalColumn > 0 guard is relaxed to goalColumn != null so the column fixup also fires at column 0. (#26)
    • Fork: src/cm_adapter.ts (findPosV line-jump clamp, posAtCoords resolution on clamped target)

Added

  • 6 regression tests for cursor movement through double-character formatting marks (**, __, ~~, ==) — asserts every position is visited in both l and h directions
  • E2E tests for gk over h4/h5/h6 headings: cursor horizontal position preserved across all heading levels
  • E2E test for gk through mixed headings, text, and lists: verifies no document lines are skipped and horizontal position is preserved on non-empty lines

Documentation

  • KNOWN_LIMITATIONS.md: updated "Visual line navigation and replaced widget decorations" section with clamp-all-jumps approach; updated gj/gk widgets behavioral deviation entry; updated test coverage count (3 → 7 heading tests)

Full Changelog: 0.42.0...0.43.0

Don't miss a new motions release

NewReleases is sending notifications on new releases.