Skip to content

Keep textarea cursors and rendering inside the viewport - #37166

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/4147530b523cf4bc300e50221d25d22dbfdfbefe
Aug 5, 2026
Merged

Keep textarea cursors and rendering inside the viewport#37166
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/4147530b523cf4bc300e50221d25d22dbfdfbefe

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 5, 2026

Copy link
Copy Markdown

Keep textarea cursors and rendering inside the viewport

What changed

  • Reserve a continuation row for the insertion point when a logical line exactly fills the textarea width.
  • Wrap overflowing spaces and keep cursor movement aligned with the resulting visual rows.
  • Clip plain, masked, and styled text rendering to the textarea bounds, and return no cursor position for empty viewports.

Testing

Add regression coverage for full lines, trailing spaces, scrolling, multi-width graphemes, empty areas, and styled overlays at textarea boundaries.

## What changed

- Reserve a continuation row for the insertion point when a logical line exactly fills the textarea width.
- Wrap overflowing spaces and keep cursor movement aligned with the resulting visual rows.
- Clip plain, masked, and styled text rendering to the textarea bounds, and return no cursor position for empty viewports.

## Testing

Add regression coverage for full lines, trailing spaces, scrolling, multi-width graphemes, empty areas, and styled overlays at textarea boundaries.

GitOrigin-RevId: 4147530b523cf4bc300e50221d25d22dbfdfbefe
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/4147530b523cf4bc300e50221d25d22dbfdfbefe branch from f4a2b70 to ad6e48d Compare August 5, 2026 21:41
@copyberry
copyberry Bot merged commit ad6e48d into main Aug 5, 2026
11 of 30 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/4147530b523cf4bc300e50221d25d22dbfdfbefe branch August 5, 2026 21:42
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant