diff --git a/JL.Core/Lookup/LookupUtils.cs b/JL.Core/Lookup/LookupUtils.cs index 068fb46a..3fffc8df 100644 --- a/JL.Core/Lookup/LookupUtils.cs +++ b/JL.Core/Lookup/LookupUtils.cs @@ -364,17 +364,16 @@ private static List SortLookupResults(IEnumerable lo return int.MaxValue; }) - //.ThenBy(static lookupResult => - //{ - // int index = lookupResult.Readings is not null - // ? Array.IndexOf(lookupResult.Readings, lookupResult.MatchedText) - // : -1; - - // return index is not -1 - // ? index - // : int.MaxValue; - //}) - //.ThenByDescending(static lookupResult => lookupResult.PrimarySpelling.Length) + .ThenBy(static lookupResult => + { + int index = lookupResult.Readings is not null + ? Array.IndexOf(lookupResult.Readings, lookupResult.MatchedText) + : -1; + + return index is not -1 + ? index + : int.MaxValue; + }) .ToList(); } diff --git a/JL.Windows/GUI/UserControls/DictOptionsControl.xaml b/JL.Windows/GUI/UserControls/DictOptionsControl.xaml index b92f9e29..7ca67e72 100644 --- a/JL.Windows/GUI/UserControls/DictOptionsControl.xaml +++ b/JL.Windows/GUI/UserControls/DictOptionsControl.xaml @@ -109,18 +109,18 @@ - - + - - +