-
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
After Paste, Undo removes one character at a time #7647
Comments
Paste works in almost all terminal emulators by printing the string character by character. In addition, the Terminal itself does not implement Ctrl+Z, so it is the job of the shell. Once we support bracketed paste (#395) and PowerShell (which I presume you are using) supports bracketed paste (PowerShell/PSReadLine#1471), this will work better. /dup #395 |
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! |
Doing directly in both PowerShell and PowerShell Core works. After pasting, hitting "Ctrl+Z" remove the entire pasted string. |
This is because powershell/core are handling ^V themselves. If you remove the ^V key binding, you can get this behavior back, but ^V will not work in CMD or WSL. |
So does this mean that basically can't get the same pasting effect in Windows Terminal as you can in PowerShell Core? One time paste revocation is very convenient and has a high efficiency. Not only does the built-in PowerShell Core terminal, but the PowerShell Integrated Console on Visual Studio Code also supports this feature. If I remember correctly, the latter is supposed to be cross-platform, so does that mean that this is still possible? |
Workaround: this fixes a PowerShell issue where pressing Ctrl+Z after pasting text removes it character by character, but also breaks Ctrl+V in CMD and WSL. Revert this once bracketed paste support improves. - microsoft/terminal#7647 (comment) - microsoft/terminal#7647 (comment)
I can see that #395 was closed in #9034 and released in v1.7.572.0 but I am still running into this issue. It is not clear if any settings need to be changed for this to work but I saw no mention of a need to change settings in the linked issue and PR. I am using: Windows terminal version: |
As mentioned above in #7647 (comment), #9034 just added support to the Terminal for bracketed paste. PowerShell / PsReadline still needs to add support on their side, too. That's tracked in PowerShell/PSReadLine#1471 |
Thanks for the links. I had gone through #395 and #9034, and must have missed that there needs to be some work done in Based on that, the current workaround still seems to be to remove the Ctrl+V binding for "Paste" in Windows Terminal. |
Environment
Steps to reproduce
Paste any text into the terminal. Press "Ctrl+Z".
Expected behavior
After pasting text into the terminal. Pressing "Ctrl+Z" should remove the entire text that was just pasted.
Actual behavior
After pasting text into the terminal. Pressing "Ctrl+Z" currently just removes one letter.
The text was updated successfully, but these errors were encountered: