Repository navigation
fix(web): escape formatting at composer boundaries - #295
Merged
Merged
Conversation
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.
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 andplainbecomes**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-bugfixesand 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.After:
**b** plainusing the same caret placements.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.