Skip to content

Render edit mode line by line#537

Open
erikjuhani wants to merge 3 commits into
mainfrom
line-by-line-raw-rendering
Open

Render edit mode line by line#537
erikjuhani wants to merge 3 commits into
mainfrom
line-by-line-raw-rendering

Conversation

@erikjuhani

Copy link
Copy Markdown
Owner

Editing used to flip the whole block to raw on entry, and rendering it from the AST during edits drifted from the source, so nested lists and structural edits were unreliable.

Render the active block with a line decorator that maps 1:1 to source lines: the cursor's line is raw and editable, the rest are decorated in place. This keeps indentation, blank lines and code blocks faithful to the source and makes editing predictable.

Read mode and non-active blocks keep the AST renderer; unifying the two is tracked in #533.

Editing used to flip the whole block to raw on entry, and rendering it
from the AST during edits drifted from the source, so nested lists and
structural edits were unreliable.

Render the active block with a line decorator that maps 1:1 to source
lines: the cursor's line is raw and editable, the rest are decorated in
place. This keeps indentation, blank lines and code blocks faithful to
the source and makes editing predictable.

Read mode and non-active blocks keep the AST renderer; unifying the two
is tracked in #533.

Changelog: changed
@erikjuhani erikjuhani force-pushed the line-by-line-raw-rendering branch from b383092 to f5bdfae Compare June 7, 2026 20:45
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