Skip to content

fix: enable undo/redo in notes editor#528

Merged
kwannoel merged 1 commit intomainfrom
session-3-2655b5
Mar 20, 2026
Merged

fix: enable undo/redo in notes editor#528
kwannoel merged 1 commit intomainfrom
session-3-2655b5

Conversation

@kwannoel
Copy link
Copy Markdown
Owner

Summary

  • Added history() extension from @codemirror/commands to the CodeMirror notes editor
  • The vim plugin's u (undo) and Ctrl+R (redo) were silently no-ops because the history state field was missing
  • Added pnpm override to deduplicate @codemirror/state and prevent the "multiple instances" error
  • Added test verifying vim undo works (fails without the fix, passes with it)

Test plan

  • pnpm test — all 292 tests pass
  • New test supports vim undo (u) to revert typed text validates the fix
  • Verified test fails when history() is removed (regression guard)

🤖 Generated with Claude Code

…tension

The vim plugin's u (undo) and Ctrl+R (redo) call CodeMirror's undo()/redo()
functions, which require the history() state field. Without it, they silently
do nothing. Added @codemirror/commands dependency with a pnpm override to
deduplicate @codemirror/state and prevent the "multiple instances" error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kwannoel kwannoel merged commit 9aef6bd into main Mar 20, 2026
1 of 3 checks passed
@kwannoel kwannoel deleted the session-3-2655b5 branch March 20, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant