Skip to content

Conversation

@occurrent
Copy link
Contributor

Fixes #2137

On Windows, Codex relies on PasteBurst for paste detection because
bracketed paste is not reliably available via crossterm.

When pasted content starts with non-ASCII characters, input is routed
through handle_non_ascii_char, which bypasses the normal paste burst
logic. This change extends the paste burst window for that path, which
should ensure that Enter is correctly grouped as part of the paste.

Adds a regression test:

  • non_ascii_start_extends_burst_window_for_enter

@github-actions
Copy link
Contributor

github-actions bot commented Dec 14, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@occurrent
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Dec 14, 2025
@dylan-hurd-oai dylan-hurd-oai self-requested a review December 16, 2025 19:41
@occurrent occurrent closed this Dec 30, 2025
@andromarces
Copy link

andromarces commented Dec 30, 2025

Hi @occurrent!

Why close this?

@occurrent
Copy link
Contributor Author

@andromarces I found original patch introduced non ascii path could mis handle multibyte input, which could lead to panics or incorrect behavior when handling multibyte characters. This should heve been fixed in the latest commit.

@occurrent occurrent reopened this Dec 30, 2025
@etraut-openai
Copy link
Collaborator

@occurrent, can you clarify the latest status of this PR? Does your most recent commit address the incorrect behavior that you noted in your comment above?

@etraut-openai etraut-openai added the needs-response Additional information is requested label Jan 5, 2026
@occurrent
Copy link
Contributor Author

@etraut-openai Yes, the most recent commit fixes the incorrect behavior mentioned earlier.

Separately, this patch may make non-ASCII input more likely to be classified as a paste block, which can expose an existing code path that does not fully handle non-ASCII input and may panic. Some of this is already being addressed in PR #8647, so I did not submit a separate fix. If this PR is merged, landing PR #8647 first would help.

Aside from that, I am not aware of other panic paths introduced by this patch, though the behavior may still need some observation in practice.

@etraut-openai
Copy link
Collaborator

OK, thanks for the update. Very helpful.

It looks like there are some test failures that need attention.

dylan-hurd-oai added a commit that referenced this pull request Jan 8, 2026
## Summary
This PR builds _heavily_ on the work from @occurrent in #8021 - I've
only added a small fix, added additional tests, and propagated the
changes to tui2.

From the original PR:

> On Windows, Codex relies on PasteBurst for paste detection because
bracketed paste is not reliably available via crossterm.
> 
> When pasted content starts with non-ASCII characters, input is routed
through handle_non_ascii_char, which bypasses the normal paste burst
logic. This change extends the paste burst window for that path, which
should ensure that Enter is correctly grouped as part of the paste.


## Testing
- [x] tested locally cross-platform
- [x] added regression tests

---------

Co-authored-by: occur <[email protected]>
pap-openai pushed a commit that referenced this pull request Jan 9, 2026
## Summary
This PR builds _heavily_ on the work from @occurrent in #8021 - I've
only added a small fix, added additional tests, and propagated the
changes to tui2.

From the original PR:

> On Windows, Codex relies on PasteBurst for paste detection because
bracketed paste is not reliably available via crossterm.
> 
> When pasted content starts with non-ASCII characters, input is routed
through handle_non_ascii_char, which bypasses the normal paste burst
logic. This change extends the paste burst window for that path, which
should ensure that Enter is correctly grouped as part of the paste.


## Testing
- [x] tested locally cross-platform
- [x] added regression tests

---------

Co-authored-by: occur <[email protected]>
@etraut-openai
Copy link
Collaborator

#8774 has been merged, so I'm closing this PR. Thanks again for your work on this @occurrent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-response Additional information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pasting multi-line text in Codex CIL only keeps first line and auto-submits on Windows

3 participants