Improve the list view to be scrollable and auto-adjust the list view height#3583
Improve the list view to be scrollable and auto-adjust the list view height#3583daxian-dbw merged 7 commits intoPowerShell:masterfrom
Conversation
PSReadLine/Prediction.Views.cs
Outdated
| private void RenderWarningLine(StringBuilder buffer) | ||
| { | ||
| // Add italic text effect to the highlight color. | ||
| string highlightColor = _singleton._options._listPredictionColor + "\x1b[3m"; |
There was a problem hiding this comment.
The use of italics should just be part of the configurable prediction highlight instead of always being added. Some users may prefer bold, for example. So this should be highlightStyle and not highlightColor
There was a problem hiding this comment.
About the new colors and styles, there are a few of them:
- un-highlighted texts in the metadata line
- highlighted text in the metadata line
- warning message
Currently,
- the un-highlighted text uses the default inline view color/style;
- the highlighted text uses the
ListPredictionColorplusitalics; - the warning message uses the
ListPredictionColorplusitalics;
I'm not sure about what to expose for configuration yet. It doesn't feel needed to expose them all in my opinion. The following are my thoughts:
- always apply
italicsto the text rendered in the metadata line, and use theListPredictionColoras the user-configurable highlighting color/style. - maybe expose configuration for un-highlighted text color/style, but I'm not super sure if it's really needed.
- warning message in this case will be uncommon for users to see because it will usually happen when the terminal height is very small (<5). So, exposing a configuration for it seems overkill to me.
I don't have a clear idea what/how to make configurable about the new color/styles at the moment, so I prefer to wait and collect some feedback about this, which hopefully will give us a clear idea. I will open an issue about this to track it.
|
Any idea when this will be released (even to a prerelease version)? I just ran Thanks! :) |
|
🎉 |
PR Summary
Fix #3563
Improve the list view to be scrollable and auto-adjust the list view height.
The scrollable list view:
The auto-adjustable list view height:
PR Checklist
Microsoft Reviewers: Open in CodeFlow