Skip to content

fix(web): escape formatting at composer boundaries - #295

Merged
lastobelus merged 1 commit into
lastcode/mainfrom
lastcode/composer-mark-boundaries
Oct 6, 2026
Merged

lastobelus merged 1 commit into
lastcode/mainfrom
lastcode/composer-mark-boundaries

Conversation

@lastobelus

@lastobelus lastobelus commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Moving the caret away from formatted text and back to its end makes subsequent typing inherit that formatting. For example, **b** followed by line-start/line-end navigation and plain becomes **b plain**. The earlier fix in #251 reset typing marks only after paste; moving the caret discarded that reset.

Replace the paste-specific helper with a small rich composer extension. Caret placement, paste, cut, and history restoration follow the text to the right, or type plain at a line end. Normal typing and explicit formatting shortcuts retain inclusive marks. The upstream diff touches the shared composer only to import and register the extension; the LastCode change belongs to upstream-bugfixes and records the superseded paste-only fix.

Validation: 106 focused tests pass in both the LastCode branch and the clean upstream branch, plus targeted lint. An isolated real-client pass verifies cursor placement, focused paste, paste-to-focus, and sustained Cmd+I typing. This applies to the shared web/desktop rich composer; the native mobile editor and provider/server paths are unchanged.

Upstream contribution: pingdotgg#13518.

Before: **b plain** after placing the caret at line start and line end.

Before

After: **b** plain using the same caret placements.

After

Short before/after recording. The baseline disables only the new plugin; the recording uses editor selection commands for caret placement. Native Meta-arrow dispatch in the preview tool did not reliably move the caret.

Implemented by GPT-6.1-Sol (xhigh) through Codex in T3 Code, with design input from GPT-6-Astra High and Claude Opus 5.5 High.

Loading
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