PowerShell / PSReadLine

A bash inspired readline implementation for PowerShell
BSD 2-Clause "Simplified" License
3.62k stars 287 forks source link

Selection styling isn't cleared after running command #3758

Open kimsey0 opened 2 years ago

kimsey0 commented 2 years ago

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

iSazonov commented 2 years ago

Reproduced only in PSReadline.

kimsey0 commented 2 years ago

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
GitHub - PowerShell/PSReadLine: A bash inspired readline implementation for PowerShell
A bash inspired readline implementation for PowerShell - GitHub - PowerShell/PSReadLine: A bash inspired readline implementation for PowerShell