Skip to content

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

Closed
PowerShell/PowerShellEditorServices
#1690

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

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

Activity

  1. ghost added
    Needs: Triage
    on Nov 10, 2021
  2. JustinGrote commented on Nov 12, 2021

    @JustinGrote
    Collaborator

    In my case it appears "prior" to the code running, probably a race condition or unawaited async involved here.

  3. StevenBucher98 commented on Nov 16, 2021

    @StevenBucher98
    Contributor

    Thanks for the information on this one! Patrick Meinecke (@SeeminglyScience) We marked as bug and will work to fix

  4. added
    Bug: Pre-release
    and removed
    Needs: Triage
    on Nov 16, 2021
  5. andyleejordan commented on Jan 6, 2022

    @andyleejordan
    Member

    Patrick Meinecke (@SeeminglyScience) Could you point me toward that "old code" and where in the new code you think this could be fixed?

  6. ghost added
    Needs: Maintainer Attention
    on Jan 11, 2022
  7. andyleejordan commented on Jan 11, 2022

    @andyleejordan
    Member

    Thanks!

  8. moved this from Todo to In Progress in Sea Biscuiton Feb 1, 2022
  9. Repository owner moved this from In Progress to Done in Sea Biscuiton Feb 1, 2022
  10. deleted a comment from ocarela on Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-Extension TerminalArea-PSReadLineBug: Pre-releaseIssue-Bug

Type

No type

Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions