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

Escape characters surround pasted text inside ssh sessions #14838

Closed
yellowpattern opened this issue Feb 13, 2023 · 5 comments
Closed

Escape characters surround pasted text inside ssh sessions #14838

yellowpattern opened this issue Feb 13, 2023 · 5 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@yellowpattern
Copy link

Windows Terminal version

1.15.3465.0

Windows build number

10.0.19045.2486

Other Software

No response

Steps to reproduce

Through use of ssh sessions inside Windows Terminals (tab'd), the application is now inserting ^[[200~ before some text and ^[[200~ after some text in some Windows, just ^[[200~ in others and also ^[[200~^[[200~^[[201~. There is inconsistent behaviour among the tabs (with respect to the exact escape sequence inserted) except to say that paste is now broken in all of them.

Expected Behavior

Plain text to be pasted.

Actual Behavior

Escape characters before and after (in some tabs).

@yellowpattern yellowpattern added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Feb 13, 2023
@yellowpattern
Copy link
Author

A similar problem is sometimes seen in MacOS iTerm2. That application has the ability to "Reset" a window (command-R) which resolves the problem. There is no such per-tab function available with Windows Terminal. I tried running "reset" from the terminal window and a "right-click" paste after that prints the follwing in cat:

^[[200~^[[200~^[[200~^[[201~^[[201~

@yellowpattern
Copy link
Author

yellowpattern commented Feb 13, 2023

If I were to guess, judging by the comments in other tickets the problem lays in whatever it is that sends the "paste-block-start" not being able to send the "paste-block-end", potentially due to WiFi connection being lost, etc. If the only way to fix this is to quit all the infected terminal tabs, I'm not a particularly happy camper. "Don't do that", you say? We (users) are not always in a position to exit editors nicely.

@237dmitry
Copy link

This behavior is observed in some terminal emulators and without ssh if you paste text with ctrl-v instead of ctrl-shift-v or shift-insert

@carlos-zamora
Copy link
Member

Looks like this is a /dup of #14258. At this point, this seems to be an incompatibility issue between shells. See https://askubuntu.com/a/991550.

@microsoft-github-policy-service
Copy link
Contributor

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service microsoft-github-policy-service bot added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants