Skip to content

After eval with F8, PSReadLine prompt appears in command output #3685

Closed
PowerShell/PowerShellEditorServices
#1690
@SeeminglyScience

Description

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.

Summary

When press F8, the prompt and PSReadLine repl area should appear after command input. Currently it does not rerender after command completion, and retains it's position.

This makes me think we are not cancelling the call to PSConsoleReadLine.ReadLine but are instead just taking it over via the delegate. The call needs to be actually cancelled before invocation and then restarted after invocation. The old code for this shows how to do this while still preserving the current repl input.

PowerShell Version

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

Visual Studio Code Version

1.61.0
ee8c7def80afc00dd6e593ef12f37756d8f504ea
x64

Extension Version

justin-grote.better-powershell-syntax-highlighting@0.0.2
ms-vscode.powershell@2021.10.2
ms-vscode.powershell-preview@2021.11.0

Steps to Reproduce

  1. Open untitled editor pane with language set to PowerShell
  2. Type Get-ChildItem
  3. Press F8
  4. Move focus to integrated console
  5. Type some stuff, hit enter, etc

Visuals

image

Logs

N/A

Metadata

Assignees

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions