github saberzero1/motions 0.75.0

latest releases: 0.147.0, 0.146.0, 0.145.0...
one month ago

Added

  • Animated cursor blinking — the canvas cursor now blinks matching CM6's default behavior (1200ms cycle, hard on/off toggle). After cursor movement, the cursor stays solid for 600ms before resuming blink. Blink epoch is aligned to the end of the reset delay so the first blink cycle starts cleanly. Blink only runs when the editor has focus; unfocused editors show a solid cursor. Suppressed during smear/smooth animation (cursor is moving). (#78)
    • Plugin: src/vim/animated-cursor/controller.ts (computeBlinkAlpha, lastMoveTime, blinkEpoch, focus-aware rAF loop)

Fixed

  • Animated cursor disappears below line ~28 — the canvas was sized to the viewport but positioned at the top of the scroll container (position: absolute; top: 0 inside scrollDOM). After scrolling, cursor coordinates pointed to positions below the canvas bounds. Fixed by moving the canvas to .app-container with position: fixed and using raw viewport-relative coordinates from coordsAtPos() directly — matching cursor-smith's architecture. The canvas is clipped to the editor pane rect via ctx.clip() each frame. (#78)
    • Plugin: src/vim/animated-cursor/controller.ts (viewport-fixed canvas, removed scroll offset math), styles.css (fixed positioning)
  • Animated cursor displaced rightward in visual mode — entering visual mode (v) shifted the canvas cursor one character to the right. In visual mode with a forward selection (anchor < head), CM6's selection.main.head points past the last selected character. The fork's BlockCursorPlugin.measureCursor() decrements head in this case, but the animated cursor used the raw value. Fixed by applying the same head adjustment: when anchor < head and the character at head isn't \n, decrement position by 1. (#78)
    • Plugin: src/vim/animated-cursor/controller.ts (head position adjustment in refreshTarget)

Documentation

  • CHANGELOG.md
  • KNOWN_LIMITATIONS.md: Marked cursor blink as fixed; removed "cursor blink after convergence" from nice-to-have (implemented)
  • docs/features/animated-cursor.md: Added cursor blinking section

Full Changelog: 0.74.0...0.75.0

Don't miss a new motions release

NewReleases is sending notifications on new releases.