Skip to content

Menu completion doesn't work properly when scrolling happens #2948

@daxian-dbw

Description

@daxian-dbw

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

No exception report.

Screenshot

Animation

Environment data

PS Version: 7.1.3
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.2.0-beta4
PSReadLine EditMode: Windows
OS: 10.0.19041.1 (WinBuild.160101.0800)
BufferWidth: 133
BufferHeight: 30

Steps to reproduce

  1. Press Enter a number of times until the prompt is at the last line of the terminal window
  2. Copy and paste the following command to the terminal: $instMods = (Get-InstalledModule | ConvertTo-Html | pandoc12.exe --from=html-auto_identifiers-native_spans-native_divs --to=gfm-gfm_auto_identifiers) -replace [reg] $env:HOMEPATH ,"`$env:HOMEPATH"
  3. Move cursor to the closing bracket ] of the [reg].
  4. Press Ctrl+Space to trigger the menu completion
  5. Move the selection to RegisterPSSessionConfigurationCommand

Here is the GIF for reproducing this:

Animation

Expected behavior

The menu completion should work correctly when moving selection around, even though necessary screen scrolling is needed.

Actual behavior

As is shown, the menu completion rendering is broken in this case, where screen buffer scrolling was needed when initially rendering the menu.

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions