Auto-resize Predictor ListView when the height is too small
See original GitHub issuePrerequisites
- 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'.
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.
Issue Analytics
- State:
- Created 8 months ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
c# - Fix ListView Item size to Auto
I tried to resize its width by -2 but still same error. It autosize is not possible on listview set to panel or...
Read more >AutoSize a .NET ListView Control
To autosize it fully, pass in the number of items that the list view control contains.
Read more >Item Height Issue in UI for WinForms
ListView leaves too much space around text in every visual item. I mean it wraps text fine, but leaves spare 15 pixels on...
Read more >Thread: [RESOLVED] ListView autosize
I am having some issues with auto sizing the list view. I have set the properties to auto size based on the ColumnContent...
Read more >Listview height autosizing - Ask for Help
The problem: I want the listview's height to be adjusted depending on the number of lines (i.e. auto-sized, like you can horizintally). I...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
🎉 This issue was addressed in 3583, which has now been successfully released in
v2.3.0-beta0
. 🎉I improved the scrollable list view to be able to adjust the list height accordingly based on the terminal height, and print warning when the terminal size is too small to show the list view.