-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The minibuffer can be opened with ":". Some commands take arguments, and if it's possible to present a selection of arguments that match a prefix, the minibuffer displays them, vertically, above the partially typed command. Prior to this commit, if the number of selections was large, the list would exceed the space in the viewport and be cut off uncleanly at the top of the terminal. This also had the unwanted side-effect of having the minibuffer's list widget compute *all* selections only to throw away (by trimming the rendered canvas of) the selections that didn't fit on the screen. This change tracks the number of currently available selections and stores that value in the widget itself. At the same time, it adjusts the height argument, in units, of the overlay used to contain the widget structure of the minibuffer, including the list. When the minibuffer is rendered, it's in a box context (columns and rows both specified). The list of selections will ultimately be rendered in a box context, but with a small gowid change too, the list's vertical space will be determined by the minimum of (a) the computed number of selections and (b) the rows left in the viewport. So all selections will be shows if they fit, and if there are too many, the list itself will handle the cutoff. This means the cmdline frame will render correctly too.
- Loading branch information
Showing
4 changed files
with
17 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters