github saberzero1/motions 0.123.0

latest releases: 1.4.0, 1.3.1, 1.3.0...
one month ago

Fixed

  • Parent editor cursor visible next to table during cell editing — when entering cell edit mode from table-nav (via i, a, c, s, or Enter), the parent editor's vim cursor layer became visible next to the table widget with an oversized height (spanning the full table widget). Root cause: enterCellEdit() called clearCursorSuppressedForView() and resumeAnimatedCursorForView() immediately, but cell editor focus was deferred by 150ms via setTimeout in finishCellEditEntry(). During the gap, the parent editor still had focus and its BlockCursorPlugin re-rendered the unsuppressed cursor at the table-range position where coordsAtPos() returns the full widget height. Additionally, even after focus transfer, a pending requestMeasure callback from a prior update cycle could redraw the cursor with suppressed=false. Fixed by removing both calls entirely — parent cursor suppression stays active throughout the nav→edit transition. exitCellEditToNav() and exitTable() handle restoring suppression state on exit. (#136)
    • Plugin: src/vim/table-nav-controller.ts (removed clearCursorSuppressedForView + resumeAnimatedCursorForView from enterCellEdit)
  • Visual/Visual Line put command not replacing selection — P, gp, and gP in visual or visual-line mode inserted text at the cursor instead of replacing the selected text. Two root causes: (1) the plugin's pasteFromRegister() (used by P/gp/gP) had no visual mode handling — it always performed a cursor-relative insert; (2) the fork's continuePaste() (used by p) read the CM6 selection via getSelectedAreaRange() and cm.getSelection(), which return a collapsed range in visual-line mode due to the cursor-only CM6 selection design (see "Visual-line cursor-only CM6 selection" in KNOWN_LIMITATIONS.md). (#139)
    • Plugin: src/workspace/navigation.ts (new pasteInVisualMode() function; visual mode detection in pasteFromRegister() delegates to it; reads vim.sel for correct range, handles visual-char and visual-line, stores replaced text in unnamed register, calls Vim.exitVisualMode())
    • Plugin: src/types/vim-api.d.ts (added exitVisualMode to VimApi interface)
    • Fork: ~/Repos/codemirror-vim/src/vim.js (continuePaste visual-line branch now derives selectionStart/selectionEnd from vim.sel instead of collapsed CM6 selection; selectedText uses cm.getRange() instead of cm.getSelection(); linewise text preparation preserves trailing newline in visual-line mode since the replacement range spans whole lines, with last-line edge case handling)
    • Fork: ~/Repos/codemirror-vim/DIFFERENCES.md (new "Visual-line paste fix" subsection)

Tests

  • 1 new regression test in test/specs/table-cursor-suppression.e2e.ts (#136): parent cursor hidden after entering cell edit via i
  • 7 new tests in test/specs/vim-builtin/normal-yank-put.e2e.ts (#139): v + p, V + p, V + P, v + P, visual paste unnamed register update, v + gp, normal mode return after visual paste
  • 4 new Neovim golden test definitions in test/neovim/test-definitions.ts (#139): v + p, V + p, V + P, v + P — all verified against Neovim
  • Recorded golden data in test/neovim/golden-data/normal-yank-put.json

Documentation

  • CHANGELOG.md
  • KNOWN_LIMITATIONS.md: marked parent cursor visible during cell editing as fixed (#136); updated "Table navigation cursor hiding" section with deferred unsuppression in enterCellEdit
  • AGENTS.md: added exitVisualMode to fork API description
  • KNOWN_LIMITATIONS.md: updated yank-ring section (visual-mode gp/gP no longer bypass yank-ring); updated V-LINE cursor-only section (fork's continuePaste now handles cursor-only selection)
  • Fork: ~/Repos/codemirror-vim/DIFFERENCES.md: new "Visual-line paste fix" subsection

Full Changelog: 0.122.0...0.123.0

Don't miss a new motions release

NewReleases is sending notifications on new releases.