Skip to content

MenuComplete on a cmdlet with a long signature moves the cursor to an incorrect position #3369

@MatejKafka

Description

@MatejKafka

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

N/A

Screenshot

image

Environment data

PS Version: 7.3.0-preview.2
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.2.6
PSReadLine EditMode: Windows
OS: 10.0.19041.1 (WinBuild.160101.0800)
BufferWidth: 208
BufferHeight: 46

Steps to reproduce

  1. Hold Enter until the prompt is at the bottom of the screen.
  2. Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
  3. Type Import-M, press Tab, then focus Import-Module in the autocomplete list (or any other command with many different parameter sets).

Expected behavior

The signature for the command is shown, the prompt moves up and the cursor returns to the edited line.

Actual behavior

The cursor returns one line above the edited line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.Resolution-Fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions