From e669af940c26f6904e72132022c7677a27262604 Mon Sep 17 00:00:00 2001 From: rampaa Date: Sun, 29 Sep 2024 00:09:46 +0300 Subject: [PATCH] Minor --- JL.Core/Lookup/LookupUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JL.Core/Lookup/LookupUtils.cs b/JL.Core/Lookup/LookupUtils.cs index 13c25243..32424361 100644 --- a/JL.Core/Lookup/LookupUtils.cs +++ b/JL.Core/Lookup/LookupUtils.cs @@ -357,6 +357,7 @@ private static List SortLookupResults(IEnumerable lo .OrderByDescending(static lookupResult => lookupResult.MatchedText.Length) .ThenByDescending(static lookupResult => lookupResult.PrimarySpelling == lookupResult.MatchedText) .ThenByDescending(static lookupResult => lookupResult.Readings?.Contains(lookupResult.MatchedText) ?? false) + .ThenByDescending(static lookupResult => lookupResult.DeconjugationProcess is null ? int.MaxValue : lookupResult.PrimarySpelling.Length) .ThenBy(static lookupResult => lookupResult.Dict.Priority) .ThenBy(static lookupResult => { @@ -409,7 +410,6 @@ private static List SortLookupResults(IEnumerable lo return 1; }) - .ThenByDescending(static lookupResult => lookupResult.PrimarySpelling.Length) .ThenBy(static lookupResult => { if (lookupResult.Frequencies?.Count > 0)