terminal
terminal copied to clipboard
Pasting multiple lines doesn't execute the last line
Windows Terminal version
1.13.10336.0
Windows build number
10.0.19042.0
Other Software
No response
Steps to reproduce
Copy multiple powershell commands from any text editor. Paste them into the powershell core tab of Windows Terminal. All lines execute except the last line. (even though i've included one or 2 blanks lines after the last line of code - to ensure getting a new line or enter)
Expected Behavior
All pasted lines of code should execute as expected.
Actual Behavior
You must manually press the enter key to get the last command to execute.
Ugh! I'm so sorry. I see there's a setting to remove trailing white-space when pasting. It's either new or got set to on with the recent upgrade. I flipped it to off and things are back to working as expected. I apologize.
ACTUALLY you know what, I'm reopening this. If there's a multiline paste that has trailing whitespace, that we should keep. We should only trim the trailing whitespace if there's a single line paste. I hit this all weekend and it annoyed the bajesus out of me. #11473
Bah, I tried doing this real quick and dirty like, but turns out the tab handling makes this a lot harder. I can't seem to wrap my head around some simple string handling today 😢
I've got a WIP in https://github.com/microsoft/terminal/compare/dev/migrie/b/12387-trim-spaces. I'm gonna tap out for now, this is a lower priority, serviceable fix.
:tada:This issue was addressed in #13698, which has now been successfully released as Windows Terminal Preview v1.16.252.:tada:
Handy links: