Skip to content
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

Add bracketed paste to Windows. #1

Open
wants to merge 5 commits into
base: bracketed_paste
Choose a base branch
from
Open

Add bracketed paste to Windows. #1

wants to merge 5 commits into from

Conversation

schungx
Copy link

@schungx schungx commented Feb 6, 2022

This one seems to work fine for me with Windows Terminal!

src/tty/windows.rs Outdated Show resolved Hide resolved
@schungx
Copy link
Author

schungx commented Feb 6, 2022

I think I should have implemented all the escape codes (at least the ones that matter) for Windows in this PR.

Except for a lone Escape.

@schungx
Copy link
Author

schungx commented Feb 6, 2022

OK, I figured out how to detect a lone Escape.

The trick is to check the console's input buffer. If there is nothing following, or if the next event is Esc key-up, then it is a lone Escape!

I tested it and it works just fine! The whole thing seems to be smooth, and there is not a single code change in my app, so the API is backwards compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants