faho · GitHub

added 2 commits

January 9, 2023 18:55
Like I mentioned in fish-shell#9089, 12 entries is a bit few.
So, instead, we do like we do for completions before disclosing and
pick half the screen (but at least X, in this case 12).
This avoids filling the entire screen, and will avoid an unsightly "X
more entries" (which requires scrolling down to fully disclose)
because it matches what the pager does.
Note: For multiline commands we can be pushed further upwards, and in
case of a multi-column layout we could fit more lines. That would
require asking the pager to fit as many as possible and give us back
the index of the last matching entry and rewinding the history search.
That's gonna be left as an exercise for later if it turns out to be necessary.
This could lead to "and 2 more entries" because of the search and the prompt

@faho

@faho faho mentioned this pull request

Jan 9, 2023

Merged

krobelus

krobelus

@faho

@faho

faho deleted the hist-pager-more-lines branch

January 9, 2023 20:40

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators

Jan 15, 2024

Read the original on github.com ↗