Skip to content

Cursor is not set properly so lots of spaces are left out there after showing progress bar #7022

@jianyunt

Description

@jianyunt

Unlike the filesystem which all the files and directories already exist in our system, SHiPS Azure provider initially does not have any data in the local system to search for . When a user is navigating around, it reaches out to Azure for fetching data and builds up the navigation tree. In the SHiPS case, when a user cd and then tab, or get-azurerm tab, the progress bar shows up while fetching data. After write-progress completes, it lefts a large spaces.

image

Initial Analysis

Both the PowerShell and PSReadline are contributing to this issue. PowerShell does not set the cursor to the place where it starts while the PSReadline does not update the cursor position in case the screen has been scrolled up for displaying progress messages.

Steps to reproduce

portal.azure.com
select bash
type pwsh
cd tab

Expected behavior

After write-progress completes the cursor should be the initial command line place, in this case "cd".

Actual behavior

Left lots of spaces used for showing progress bar.

Environment data

6.1.0-preview.2
and
PSReadLine 2.0.0-Beta.1 or PSReadLine 2.0.0-Beta.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productWG-Enginecore PowerShell engine, interpreter, and runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions