github saberzero1/motions 0.59.0

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

Fixed

  • Absolute line number highlight not updating on cursor movement — when only absolute line numbers were enabled (set number without set relativenumber), the vim-motions-line-num-current highlight (bold current line number) did not follow the cursor. The lineMarkerChange callback in both the standalone line number gutter and the unified statuscolumn gutter only checked update.docChanged in absolute mode, ignoring update.selectionSet (cursor movement). Relative and hybrid modes were unaffected because they already included update.selectionSet. The highlight only updated incidentally when entering special content (MathJax, images) that triggered docChanged or viewportChanged. (#68)
    • Plugin: src/vim/line-number-gutter.ts (lineMarkerChange absolute branch), src/vim/statuscolumn.ts (lineMarkerChange !hasRelative branch)
  • Typing | moves cursor to the left of | — typing | anywhere in insert mode triggered the table auto-format inputHandler, which intercepted the keystroke and repositioned the cursor even on non-table lines (any line matching /^\s*\|/). The mid-edit interception caused cursor jumps, making it impossible to type | normally in an empty document or at the start of a line. (#66)
  • Tables do not handle escaped | characters correctly — in raw/cursor-aware table modes, escaped pipes (\|) inside cells were treated as cell boundaries during mid-edit auto-formatting, causing the cursor to jump and live preview to render extra cells. The auto-format inputHandler ran realignTableLines() after every | keystroke, which repositioned the cursor based on the realigned table structure — even when the | was escaped. Wikilinks ([[page|alias]]) inside raw table cells also triggered incorrect cell boundary detection. (#67)
    • Root cause for both: table-auto-format.ts intercepted every | keystroke in insert mode and ran column realignment mid-edit.
    • Fix: Replaced mid-edit | interception with format-on-exit — tables are only realigned when the cursor leaves the table range. A CM6 ViewPlugin tracks cursor entry/exit from table ranges and dispatches realignTableLines() via queueMicrotask when the cursor exits a dirty (edited) table. Uses Annotation.define<boolean>() as a re-entrancy guard. The || → separator row auto-generation is preserved as a standalone inputHandler.
    • Plugin: src/vim/table-format-on-exit.ts (new: format-on-exit ViewPlugin + separator handler), src/vim/table-utils.ts (added realignTableLines(), parseAlignments(), buildSepCell(), findTableBounds(), canonical Alignment type), src/vim/table-auto-format.ts (deleted), src/vim/table-cursor-fix.ts (deleted), src/vim/table-operations.ts (refactored to use shared realignTableLines()), src/motions/tables.ts (refactored to use shared realignTableLines(), removed 5 duplicate helpers), src/vim/table-render-widget.ts (uses canonical Alignment type), src/vim/table-nav-controller.ts (added tableRealign() in doRefreshAfterOp() for embedded cell edit alignment), src/vim/table-cell-editor.ts (removed createTableAutoFormatExtension dependency), src/motions/register.ts (removed tableAwareMoveUp override on k), src/main.ts (replaced auto-format/cursor-fix registration with format-on-exit)

Changed

  • Neovim-style modal styling for GlobalExCommandModal and VimInfoModal — the ex command modal (: in non-editor views) and the info modal (:marks, :buffers, :registers, Oil g?) now use Neovim-inspired styling: transparent container, accent border (--color-accent), floating title label positioned on the top border, monospace font, and hidden Obsidian chrome (close button, modal header). GlobalExCommandModal uses a prompt-modal pattern with three styled sections (input, results, instructions) and two-column suggestion rows showing :command + description. All 40+ ex commands now have description fields. VimInfoModal uses an info-modal pattern with an accent-bordered inner wrapper. Both patterns use --modal-background, --font-monospace, and --color-accent CSS variables for full theme compatibility.
    • Plugin: src/ui/global-ex-command.ts (description field on GlobalExEntry and ExSuggestion, prompt-modal container styling, two-column renderSuggestion), src/ui/vim-info-modal.ts (info-modal container styling, floating title, inner wrapper), styles.css (new prompt-modal and info-modal CSS sections)
  • Neovim-style modal styling extended to remaining modals — OutlineModal (:outline/gO), SearchResultsModal (:vimgrep), ContextActionsModal (gra), and OilConfirmModal (Oil destructive commit) now use the same Neovim-inspired styling as GlobalExCommandModal and VimInfoModal. OutlineModal shows heading text + line number, SearchResultsModal shows filename + line preview, ContextActionsModal shows command name + command ID. OilConfirmModal uses the info-modal pattern with accent-bordered buttons. Removed 3 unused CSS classes (vim-motions-search-file, vim-motions-search-preview, vim-motions-outline-item).
    • Plugin: src/ui/outline-modal.ts, src/workspace/vault-search.ts, src/ui/context-actions.ts, src/oil/manager.ts, styles.css

Documentation

  • KNOWN_LIMITATIONS.md: Absolute line number highlight not updating on cursor movement → Fixed
  • KNOWN_LIMITATIONS.md: Table auto-formatting → updated to describe format-on-exit behavior; typing | cursor jump (#66) → Fixed; escaped \| handling (#67) → Fixed
  • docs/features/tables.md: Auto-formatting section rewritten to describe format-on-exit behavior

Full Changelog: 0.58.0...0.59.0

Don't miss a new motions release

NewReleases is sending notifications on new releases.