Skip to content
Myr

Fix inconsistent bonus points in exact match

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Exact match would assign a different bonus point to the first character when non-default --scheme was used. Fix #3073

authored by Junegunn Choi · committed by Junegunn Choi · parent 3f079ba · Browse files · 2 files+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−2 removed

  • other:+2 added−2 removed

2 files+2 added−2 removed

modified:src/algo/algo.go+1 added-1 removed
615 unmodified lines
616// Implement the same sorting criteria as V2617func calculateScore(caseSensitive bool, normalize bool, text *util.Chars, pattern []rune, sidx int, eidx int, withPos bool) (int, *[]int) {618 pidx, score, inGap, consecutive, firstBonus := 0, 0, false, 0, int16(0)619 pos := posArray(withPos, len(pattern))620 prevClass := charWhite620 prevClass := initialCharClass621 if sidx > 0 {622 prevClass = charClassOf(text.Get(sidx - 1))623 }624 for idx := sidx; idx < eidx; idx++ {
322 unmodified lines
modified:CHANGELOG.md+1 added-1 removed
7 unmodified lines
8 ```sh9 # No need to bind 'double-click' to the same action10 fzf --bind 'enter:execute:less {}' # --bind 'double-click:execute:less {}'11 ```12- Minor rendering improvements12- Minor bug fixes and improvements13140.35.115------16- Fixed a bug where fzf with `--tiebreak=chunk` crashes on inverse match query
1386 unmodified lines