Skip to content

Commit

Permalink
fix unmatched penalty value
Browse files Browse the repository at this point in the history
  • Loading branch information
biletskyy authored and mhanberg committed Sep 10, 2023
1 parent a19f939 commit 09f93d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/next_ls.ex
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ defmodule NextLS do
defp calc_matched_bonus(score, _traits, _new_traits), do: score

# penalty applied for every letter in str before the first match
defp calc_unmatched_penalty(score, %{leading: true}) when score > -15, do: score - 15
defp calc_unmatched_penalty(score, %{leading: true}) when score > -15, do: score - 5

# penalty for unmatched letter
defp calc_unmatched_penalty(score, _traits), do: score - 1
Expand Down

0 comments on commit 09f93d5

Please sign in to comment.