From 7c09895e7e76397b863a39d58385f1052a08f55f Mon Sep 17 00:00:00 2001 From: Dmitry Biletskyy Date: Wed, 30 Aug 2023 18:15:55 +0300 Subject: [PATCH] fix unmatched penalty value --- lib/next_ls.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/next_ls.ex b/lib/next_ls.ex index e7f361a8..499a41bd 100644 --- a/lib/next_ls.ex +++ b/lib/next_ls.ex @@ -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