Skip to content

Markdown: hybrid editing — rendered except for the block you are editing (#460) - #497

Merged
raiseCatError merged 3 commits into
devfrom
feature/v024-hybrid
Oct 21, 2026
Merged

raiseCatError merged 3 commits into
devfrom
feature/v024-hybrid

Conversation

@raiseCatError

@raiseCatError raiseCatError commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Based on current dev (all of #489–#496 are merged).

  • F3 (or H from the read-only views) shows a Markdown document rendered, except the block under the caret/selection, which shows its exact source and is fully editable. Another presentation of the one TextBuffer: every key is the editor's, switching views never changes the text.
  • Built on the shared source map (Block.from/to, DocumentIndex): smallest safe region (whole list / table / fence), raw fallback for anything the parser cannot place, viewport anchored to a source line so revealing a block does not move what is above it, no re-parse on cursor movement, only changed items re-rendered, only visible rows drawn.
  • Works with snippets, list/table helpers, undo/redo, recovery drafts, hunk review, Save As/Playground and heading navigation; in the split (F2) F3 switches the text pane between source and hybrid.
  • Not in this PR (ledger): images in place, visual-line Up/Down, pointer input, tables as a grid, HTML files.

Tests: hybrid.test.ts (21, incl. a 300-step mode/move/resize walk asserting the text never changes, budgets on 4,000 lines, NO_COLOR/hostile/CRLF/BOM, three real-app tests). Combined run with workspace/split/editor/input-ownership suites: 180 pass. Independent review (separate Opus reviewer, adversarial): lossless-source invariant held through 150 randomized 400-step runs; nine real findings (stray-CR span shift, double caret at wrap boundaries, wheel undone, unbounded cache, per-key re-wrapping, stale cache key, tiny viewports, reload dropping hybrid) all fixed with regression tests in this PR. Not run: full suite, physical QA.
Refs #460.

@raiseCatError
raiseCatError merged commit e0521eb into dev Oct 21, 2026
12 checks passed
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