Disclose pager to half of screen height immediately #9105
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This removes that bit where we only show 4 rows at most at first,
instead we disclose between half and up to the full terminal height.
This results in less pressing of tab to get the other results, and
better visibility of results.
However, it also means that it'll push the shell up to the top of the
terminal a lot.
So this is an experiment to see how that works in practice.
Fixes #2698
The direct impetus for this is #9089, which creates up to 12 rows. In that case it feels supremely weird to have to disclose "8 more rows", when there's clearly more room.
An alternative is to increase the maximum either up to a constant, or up to half the terminal height.
There's some weirdness here where it doesn't count the pager as fully disclosed, and so pressing tab again doesn't immediately move down into it, which doesn't actually save any key presses. I'd look into it, but only after we've decided which way to go.
(also the constant here still exists and such)
Edit: Originally this went fullscreen immediately. That's awkward because it removes all scrollback.