Skip to content

Commit

Permalink
Support list-lines setting in history search
Browse files Browse the repository at this point in the history
Implements issue #255.
  • Loading branch information
marlonrichert committed May 16, 2021
1 parent 966312b commit 405c292
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion completion/_autocomplete.history_lines
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ _autocomplete.history_lines() {
return 1

local -A events=()
local -i max_lines=$(( min( 16, HISTNO - 1, LINES - BUFFERLINES ) ))
local -i min_lines max_lines
zstyle -s ":autocomplete:${curcontext}:" list-lines min_lines ||
min_lines=16
(( max_lines = min( min_lines, HISTNO - 1, LINES - BUFFERLINES ) ))

if [[ -z $BUFFER ]]; then
if [[ $curcontext == *-forward:* ]]; then
Expand Down

0 comments on commit 405c292

Please sign in to comment.