When using PSReadLine 1.2, and pasting text that has newlines _without_ carriage returns, the lines come out in reverse order.
Seems to be happening because of this key handler: https://github.com/lzybkr/PSReadLine/blob/master/PSReadLine/KeyBindings.cs#L135
LF is interpreted as Ctrl+Enter and triggers InsertLineAbove
which pushes each text line down as the right click paste is getting processed one char at a time. CRLF works fine because CR triggers AcceptLine
. Ctrl+V paste works because it inserts all of the clipboard in one go.
Remove-PSReadlineKeyHandler Ctrl+Enter
Closing in favor of #579 which covers all of the known issues with right-click paste.
Windows 10, 1909, just got bit by this bug.
How and why is this not fixed more than 3 years after being reported?
Most helpful comment
Seems to be happening because of this key handler: https://github.com/lzybkr/PSReadLine/blob/master/PSReadLine/KeyBindings.cs#L135
LF is interpreted as Ctrl+Enter and triggers
InsertLineAbove
which pushes each text line down as the right click paste is getting processed one char at a time. CRLF works fine because CR triggersAcceptLine
. Ctrl+V paste works because it inserts all of the clipboard in one go.Workaround
Remove-PSReadlineKeyHandler Ctrl+Enter