-
Notifications
You must be signed in to change notification settings - Fork 7.4k
fix: windows can now paste non-ascii multiline text #8774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
64ecd2d
fix: windows can now paste non-ascii multiline text
occurrent feae773
tui: improve paste-burst handling for non-ASCII input
occurrent 7766382
Fix paste burst handling
occurrent 40665cb
Enter suppressed after single non‑ASCII keystroke
dylan-hurd-oai f76c623
duplicate changes to tui2
dylan-hurd-oai 4bb2df2
add additional tests, fix handle_shortcut_overlay_key
dylan-hurd-oai ae15b95
comment
dylan-hurd-oai 4bf84b1
Fix non-ascii paste burst heuristic
dylan-hurd-oai 02280ec
cleanup
dylan-hurd-oai 1d604f5
start consolidating
dylan-hurd-oai 85acee7
synchronize tests
dylan-hurd-oai 2082d2b
add repro case
dylan-hurd-oai 67f0cc0
simplified tests
dylan-hurd-oai 63741a7
tui2 consistency
dylan-hurd-oai e44df3e
one more cleanup
dylan-hurd-oai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to capture the reason for the differences in these intervals - are they based on testing / docs / ? Do we have more context on why we might increase or decrease? Are they likely to cause differences in operating systems / remote systems / multiplexers?
Maybe just something here that captures why we chose is enough and we can come back to the deeper questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Windows, if we use an 8ms interval, copying long non-ASCII text might cause the Pasted Content Block to be split into multiple chunks, indicating that the paste burst was temporarily exited midway through the paste process. Sometimes, it might even cause line breaks to be recognized as commits. I'm not sure if there's a better way.
The following images show the results caused by two different delays.
8ms:

60ms:

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - mostly I want a short summary in the code, so we know why / how to tweak it if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @occurrent! I added a comment here and made this platform-specific