From 6b207bbf2bd916d06586cdbbf980ae507c01f2b2 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 4 Dec 2022 22:14:11 +0900 Subject: [PATCH] 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 --- CHANGELOG.md | 2 +- 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)) }