github saberzero1/motions 0.57.0

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

Fixed

  • Table cell edits not rendered immediately in embedded mode — editing a table cell and pressing Escape or Tab wrote the change to the document but did not visually update the rendered table widget until the user navigated away or switched cells. The tableRenderField StateField's update() method has a "D12 guard" (activeEditTableRange) that, when set, maps old decorations instead of rebuilding them on docChanged. This guard was correctly cleared for table operations (o, dd, J, K, etc.) via executeTableOp() and for full table exit via exitTable(), but exitCellEdit() — the path taken when closing a cell editor — never cleared it. The dispatch from closeCellEditor() triggered docChanged while the guard was still active, causing prev.map(tr.changes) (position-only shift) instead of buildDecorations() (full HTML rebuild). Fixed by adding setActiveEditTableRange(null) before closeCellEditor() and replacing the immediate highlightCell() with refreshAfterOp() — the same pattern used by all other table mutation paths. (#61)
    • Plugin: src/vim/table-nav-controller.ts (exitCellEdit())
  • Visual-line mode highlight missing on replaced widget blocks — in visual-line mode (V), the fork's linewiseVisualHighlight ViewPlugin uses Decoration.line() to highlight selected lines, but replaced widget blocks (MathJax $$, note embeds ![[note]], plugin table widgets) have no .cm-line elements in the DOM — CM6 silently drops line decorations for replaced ranges. Fixed by adding a plugin-side LinewiseWidgetHighlight ViewPlugin that scans contentDOM direct children for non-.cm-line widget elements and toggles cm-vim-linewise-widget-selection on widgets whose document range overlaps the visual-line selection. Uses view.posAtDOM() for position mapping. Generic — works for all replaced widget types, not just MathJax. (#57)
    • Plugin: src/vim/linewise-widget-highlight.ts (new), styles.css (.cm-vim-linewise-widget-selection rule), src/main.ts (extension registration)

Full Changelog: 0.56.0...0.57.0

Don't miss a new motions release

NewReleases is sending notifications on new releases.