PSReadLine icon indicating copy to clipboard operation
PSReadLine copied to clipboard

Selection styling isn't cleared after running command

Open kimsey0 opened this issue 3 years ago • 2 comments

Prerequisites

Steps to reproduce

  1. Open a new PowerShell terminal with (pwsh.exe) or without a profile (pwsh.exe -NoProfile).
  2. Write any command, for example cd .
  3. Select all or part of the command, for example with Ctrl+A or Shift+←.
  4. Run the command with Enter.

Expected behavior

The command is deselected and executed.

Actual behavior

The command is executed, but retains the selection styling.

Error details

No response

Environment data

Reproducible both on Windows and Ubuntu in latest stable and latest preview releases, for example these two environments:

Name                           Value
----                           -----
PSVersion                      7.3.0-preview.4
PSEdition                      Core
GitCommitId                    7.3.0-preview.4
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Name                           Value
----                           -----
PSVersion                      7.2.4
PSEdition                      Core
GitCommitId                    7.2.4
OS                             Linux 5.10.102.1-microsoft-standard-WSL2 PowerShell/PowerShell#1 SMP Wed Mar 2 00:30:59 UTC 2022
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

Typing out a command in PowerShell, selecting it, running it, and seeing the command still be styled as if it was selected

kimsey0 avatar Jun 16 '22 09:06 kimsey0

Reproduced only in PSReadline.

iSazonov avatar Jun 16 '22 11:06 iSazonov

I haven't installed PsReadLine. Is it installed and used by default? If yes, should this issue be moved to https://github.com/PowerShell/PSReadLine?

GitHub
A bash inspired readline implementation for PowerShell - GitHub - PowerShell/PSReadLine: A bash inspired readline implementation for PowerShell

kimsey0 avatar Jun 16 '22 12:06 kimsey0