You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You're using the menu or right click, right? If so, I'm aware of the issue, I just haven't come up with a fix I'm happy with yet.
Note that pasting tabs is a problem with a default PowerShell installation, but mostly nobody notices. It usually inserts nothing (no tab or even spaces) or if the tab is in the middle of the line, it will actually try completion and probably mess things up.
As a workaround, you can use Ctrl+V to paste in Windows mode or bind the Paste function to the key of your choice. As a bonus, pasting this way is much faster.
Hmm, Ctrl+V does indeed work (while putting in lots of ^I^I characters everywhere) but the code comes out clean so that's all I care about.
One last thing with this, when I Ctrl+V a huge block of code (and it's fast!) and then on the very next line Ctrl+R, the screen refreshes, scrolls all the way to the top of the buffer and starts doing my Forward Search. Is this known as well?
Edit: Oh I see what it's doing, because of the large 100 line paste when I backwards search, thats the first item it finds so it flushes my buffer out so it can display those 100 lines. Man, that's just goofy to have those 100 lines show up over and over again like that.
^I is tab - Ctrl+I is 0x9 and that's how it gets rendered. Maybe I should change it to display spaces.
Paste with right click is also faster w/ PSReadLine than without, but Ctrl+V is fastest because it doesn't simulate entering each key.
The Ctrl+R experience isn't great with long blocks of code. I guess I could truncate the buffer some - ensuring the prompt, matching text, and search string line are all on the same screen. I'll play around with this idea some when I get a chance.
Activity
lzybkr commentedon Jan 13, 2014
You're using the menu or right click, right? If so, I'm aware of the issue, I just haven't come up with a fix I'm happy with yet.
Note that pasting tabs is a problem with a default PowerShell installation, but mostly nobody notices. It usually inserts nothing (no tab or even spaces) or if the tab is in the middle of the line, it will actually try completion and probably mess things up.
As a workaround, you can use Ctrl+V to paste in Windows mode or bind the Paste function to the key of your choice. As a bonus, pasting this way is much faster.
I
frizop commentedon Jan 13, 2014
Hmm, Ctrl+V does indeed work (while putting in lots of ^I^I characters everywhere) but the code comes out clean so that's all I care about.
One last thing with this, when I Ctrl+V a huge block of code (and it's fast!) and then on the very next line Ctrl+R, the screen refreshes, scrolls all the way to the top of the buffer and starts doing my Forward Search. Is this known as well?
Edit: Oh I see what it's doing, because of the large 100 line paste when I backwards search, thats the first item it finds so it flushes my buffer out so it can display those 100 lines. Man, that's just goofy to have those 100 lines show up over and over again like that.
lzybkr commentedon Jan 13, 2014
^I is tab - Ctrl+I is 0x9 and that's how it gets rendered. Maybe I should change it to display spaces.
Paste with right click is also faster w/ PSReadLine than without, but Ctrl+V is fastest because it doesn't simulate entering each key.
The Ctrl+R experience isn't great with long blocks of code. I guess I could truncate the buffer some - ensuring the prompt, matching text, and search string line are all on the same screen. I'll play around with this idea some when I get a chance.
kayasax commentedon Jul 24, 2015
I have same problem here, but ctrl+V only paste the first line of my clipboard ...? (I'm using powershell within ConEmu)
lzybkr commentedon Nov 11, 2017
Closing in favor of #579 which covers all of the known issues with right-click paste.