From 1cdcd95cb73503bea8c31f4fe4ee68760b1de069 Mon Sep 17 00:00:00 2001 From: Ondrej Petrzilka Date: Fri, 14 Oct 2016 14:44:07 +0200 Subject: [PATCH] Fixed missing fitness calculation when searching for types and members --- ILSpy/SearchStrategies.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ILSpy/SearchStrategies.cs b/ILSpy/SearchStrategies.cs index ef7570849..d8340deb3 100644 --- a/ILSpy/SearchStrategies.cs +++ b/ILSpy/SearchStrategies.cs @@ -404,11 +404,13 @@ namespace ICSharpCode.ILSpy { if (IsMatch(type.Name) || IsMatch(type.FullName)) { + string name = language.TypeToString(type, includeNamespace: false); addResult(new SearchResult { Member = type, Image = TypeTreeNode.GetIcon(type), - Name = language.TypeToString(type, includeNamespace: false), + Fitness = CalculateFitness(type, name), + Name = name, LocationImage = type.DeclaringType != null ? TypeTreeNode.GetIcon(type.DeclaringType) : Images.Namespace, Location = type.DeclaringType != null ? language.TypeToString(type.DeclaringType, includeNamespace: true) : type.Namespace });