diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2022-12-04 22:14:11 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2022-12-04 22:17:39 +0900 |
| commit | 6b207bbf2bd916d06586cdbbf980ae507c01f2b2 (patch) | |
| tree | 549857f8c08b97455f59f4421a6e392da9f11ab4 | |
| parent | 3f079ba7c6d5a95f69699422329e9c5150002448 (diff) | |
| download | fzf-6b207bbf2bd916d06586cdbbf980ae507c01f2b2.tar.gz | |
Fix inconsistent bonus points in exact match
Exact match would assign a different bonus point to the first character
when non-default --scheme was used.
Fix #3073
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | src/algo/algo.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e9475653..528b0e2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ CHANGELOG # No need to bind 'double-click' to the same action fzf --bind 'enter:execute:less {}' # --bind 'double-click:execute:less {}' ``` -- Minor rendering improvements +- Minor bug fixes and improvements 0.35.1 ------ diff --git a/src/algo/algo.go b/src/algo/algo.go index 50dd466c..ba09dc50 100644 --- a/src/algo/algo.go +++ b/src/algo/algo.go @@ -617,7 +617,7 @@ func FuzzyMatchV2(caseSensitive bool, normalize bool, forward bool, input *util. func calculateScore(caseSensitive bool, normalize bool, text *util.Chars, pattern []rune, sidx int, eidx int, withPos bool) (int, *[]int) { pidx, score, inGap, consecutive, firstBonus := 0, 0, false, 0, int16(0) pos := posArray(withPos, len(pattern)) - prevClass := charWhite + prevClass := initialCharClass if sidx > 0 { prevClass = charClassOf(text.Get(sidx - 1)) } |
