Skip to content

Commit

Permalink
Fix bug in fuzzy history sort weights
Browse files Browse the repository at this point in the history
Fixes #626.
  • Loading branch information
marlonrichert committed Aug 16, 2023
1 parent 620ffca commit 453df9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Completions/_autocomplete__history_lines
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ _autocomplete__history_lines() {
for index in {1..$#displays[@]}; do
num=${(SM)${(M)displays[index]##$~numpat}##<->}
displays[index]=${history[$num]:/(#b)$~lbuffer($~query)$~rbuffer/$((
HISTNO + num - 64 * $#match[3] - 16 * mbegin[3] - 4 * $#match[1]
HISTNO - num + 64 * $#match[3] + 16 * mbegin[3] + 4 * $#match[1]
))}$'\0'$displays[index]
done
displays=( ${${(@nO)displays}[@]##<->$'\0'} )
displays=( ${${(@n)displays}[@]##<->$'\0'} )
fi
fi

Expand Down

0 comments on commit 453df9e

Please sign in to comment.