Skip to content

Auto-resize Predictor ListView when the height is too small  #3563

Closed
@StevenBucher98

Description

@StevenBucher98

Prerequisites

  • Write a descriptive title.

Description of the new feature/enhancement

When my shell windows are too small to display all ten predictions in ListView, it should reduce the size to be able to display a smaller number of predictions.

This is particularly applicable in CloudShell where the default window when you open CloudShell is too small for ListView and so fails silently when I try using F2 and gives this error message when I try to set:

PS /home/steven> Set-PSReadLineOption -PredictionViewStyle ListView
WARNING: The prediction 'ListView' is temporarily disabled because the current window size of the console is too small. To use the 'ListView', please make sure the 'WindowWidth' is not less than '54' and the 'WindowHeight' is not less than '15'.
Screen.Recording.2023-02-02.at.10.00.06.AM.mov

Proposed technical implementation details (optional)

There are a few ways to improve this experience.

  • Incorporate similiar error message that Set-PSReadLineOption gives when the user tries F2
  • Make ListView number of results resizable based on the window.
  • Make ListView number of results resizable based on the window and incorporate scrollable functionality to enable users to see the other results given a smaller window.

cc @theJasonHelmick @daxian-dbw

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions