mirror of
https://github.com/stablyai/orca.git
synced 2026-09-25 16:02:38 +00:00
* fix: Cmd+X in rich markdown editor deletes only the current line - Guard against depth < 1 (GapCursor before top-level leaf nodes) to prevent RangeError crash - Add visual-line cutting for word-wrapped paragraphs so Cmd+X removes one visual line at a time instead of the entire paragraph - Normalize soft line breaks on load/update: split paragraphs with embedded \n into separate paragraph nodes so block-level cut works per-line - Add comprehensive tests for cut handler behavior and normalization * fix: address review findings - Normalize soft breaks at all document depths (not just top-level) using doc.descendants() instead of doc.forEach() - Capture transaction lazily from editor.view.state.tr to avoid stale state after setContent() * fix: use editor.view.state consistently in normalizeSoftBreaks Read doc and create tr from editor.view.state (not editor.state) so position collection and transaction application share the same base state, avoiding stale-doc corruption after setContent().