Repository navigation
Markdown: hybrid editing — rendered except for the block you are editing (#460) - #497
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on current
dev(all of #489–#496 are merged).Hfrom 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.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.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.