Skip to content

Fix/tui windows multiline paste - #2544

Merged
aibrahim-oai merged 9 commits into
mainfrom
fix/tui-windows-multiline-paste
Aug 22, 2025
Merged

aibrahim-oai merged 9 commits into
mainfrom
fix/tui-windows-multiline-paste

Conversation

@aibrahim-oai

Copy link
Copy Markdown
Contributor

Introduce a minimal paste-burst heuristic in the chat composer so Enter is treated as a newline during paste-like bursts (plain chars arriving in very short intervals), avoiding premature submit after the first line on Windows consoles that lack bracketed paste.

  • Detect tight sequences of plain Char events; open a short window where Enter inserts a newline instead of submitting.
  • Extend the window on newline to handle blank lines in pasted content.
  • No behavior change for terminals that already emit Event::Paste; no OS/env toggles added.

Introduce a minimal paste-burst heuristic in the chat composer so Enter
is treated as a newline during paste-like bursts (plain chars arriving in
very short intervals), avoiding premature submit after the first line on
Windows consoles that lack bracketed paste.

- Detect tight sequences of plain Char events; open a short window where
  Enter inserts a newline instead of submitting.
- Extend the window on newline to handle blank lines in pasted content.
- No behavior change for terminals that already emit Event::Paste; no
  OS/env toggles added.
- Kept changes local and minimal; tests pass (cargo test -p codex-tui).
@aibrahim-oai
aibrahim-oai force-pushed the fix/tui-windows-multiline-paste branch 2 times, most recently from 408b52f to 80d4705 Compare August 22, 2025 18:29
@aibrahim-oai
aibrahim-oai merged commit cdc77c1 into main Aug 22, 2025
@aibrahim-oai
aibrahim-oai deleted the fix/tui-windows-multiline-paste branch August 22, 2025 19:24
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 22, 2025
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.

2 participants