Skip to content

Add bracketed paste to Windows.#1

Open
schungx wants to merge 5 commits into
gwenn:bracketed_pastefrom
schungx:bracketed_paste
Open

Add bracketed paste to Windows.#1
schungx wants to merge 5 commits into
gwenn:bracketed_pastefrom
schungx:bracketed_paste

Conversation

@schungx

@schungx schungx commented Feb 6, 2022

Copy link
Copy Markdown

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

Comment thread src/tty/windows.rs Outdated
Comment thread src/tty/windows.rs
@schungx

schungx commented Feb 6, 2022

Copy link
Copy Markdown
Author

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

schungx commented Feb 6, 2022

Copy link
Copy Markdown
Author

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