Prerequisites
Exception report
Screenshot

Environment data
PS Version: 7.5.4
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.4.5
PSReadLine EditMode: Windows
OS: 10.0.26100.7306 (WinBuild.160101.0800)
BufferWidth: 361
BufferHeight: 96
Steps to reproduce
In a pwsh -NoProfile session, run the following:
Set-PSReadLineKeyHandler -Chord "Ctrl+r" -ScriptBlock {
[Microsoft.PowerShell.PSConsoleReadLine]::RevertLine()
[Microsoft.PowerShell.PSConsoleReadLine]::Insert("Inserted Text")
}
Set-PSReadLineOption -PredictionViewStyle ListView
Then, type foo (without pressing the enter key) and press Ctrl+R.
Expected behavior
Pressing Ctrl+R should replace foo by Inserted Text in the prompt.
Actual behavior
Pressing Ctrl+R adds Inserted Text to the existing foo: the end result is fooInserted Text in the prompt.
Prerequisites
Exception report
N/AScreenshot
Environment data
Steps to reproduce
In a
pwsh -NoProfilesession, run the following:Then, type
foo(without pressing the enter key) and press Ctrl+R.Expected behavior
Pressing Ctrl+R should replace
foobyInserted Textin the prompt.Actual behavior
Pressing Ctrl+R adds
Inserted Textto the existingfoo: the end result isfooInserted Textin the prompt.