-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Paste adding extra new lines #9378
Comments
This sounds like something that bracketed paste (#395) might just fix. Can you try installing Windows Terminal Preview, and see if that fixes it? Preview added support for bracketed paste in 1.7. |
@zadjii-msft thanks, but sadly no. Got the same results. Installed v1.7.572.0 |
Like Dustin said in #9364 (comment) you may need to use a newer version of Win32-OpenSSH in order to make the bracketed paste work over SSH. |
Huzzah! That works. Will the newer version of both of these be released soon? |
The 1.7 preview will become 1.7 stable about the end of the month, or maybe next month. You know, the preview version is actually good enough for most people I think. The preview version is released after being tested inside Microsoft. I've been using preview like forever. I do not know about the release schedule of Win32-OpenSSH, though. That's probably what @DHowett can answer. |
Well there's been no movement on it for over a year and they're quite a few releases behind the mainstream ssh. By now we should be at 8.5 but 8.1 is the last release. The Powershell team is supposed to be responsible for it but seems like it's just not a priority for them. I almost consider it abandonware for that reason. |
Still having this issue in windows terminal (no SSH or anything). Strangely enough, I was on version 1.8, and never had this issue until today. I'm not sure what changed (I did install WSL and Ubuntu the other day, though I'm not using it, but maybe that has something to do with it), but I updated to the most recent (version: 1.10.2714.0) to try to fix it but no luck. Pasting into ipython will paste individual lines and add indentation to each line. Edit: |
@trevor-pope I'm having a similar issue with IPython recently and found a way to solve it. I guess you might be having the same problem and I want to share my findings: I'm using IPython in Windows Terminal. The profile is On Windows, IPython does not emit
When using Windows Terminal, the second mechanism (handler for Ctrl-V key event) will not work because Ctrl-V is already handled by Windows Terminal (as in the default When using the traditional conhost, the incorrect indentation does not happen even when |
Environment
Steps to reproduce
I am constantly ssh-ing to a box, starting up iPython, pasting a block of code (with methods), and then running selected methods. Currently I've been using
putty
and this works great.Switching to
Windows Terminal
I tried this, and it pastes one line at a time, and thus errors out.I can do awkward things like
%cpaste
in iPython or:set paste
in Vim, but that makes things more complicatedFor example pasting:
Expected behavior
I should get this, everything pasted together:

Actual behavior
I get this:

Which obviously will cause errors
The text was updated successfully, but these errors were encountered: