We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6237692 commit d5d78d9Copy full SHA for d5d78d9
src/textual/fuzzy.py
@@ -134,7 +134,7 @@ def score(search: _Search) -> float:
134
# Boost to favor less groups
135
offset_count = len(search.offsets)
136
normalized_groups = (offset_count - (search.groups - 1)) / offset_count
137
- score *= 1 + (normalized_groups**2)
+ score *= 1 + (normalized_groups * normalized_groups)
138
return score
139
140
stack: list[_Search] = [_Search()]
@@ -156,8 +156,8 @@ def score(search: _Search) -> float:
156
yield score(advance_branch), advance_branch.offsets
157
push(branch)
158
else:
159
- push(advance_branch)
160
+ push(advance_branch)
161
162
163
@rich.repr.auto
0 commit comments