Browse Source

fixed "Bug 2072 - Duplicate entries in the code completion list".

newNRvisualizers
Mike Krüger 14 years ago
parent
commit
e90bf1cbf3
  1. 6
      ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs

6
ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs

@ -78,8 +78,10 @@ namespace ICSharpCode.NRefactory.CSharp.Completion @@ -78,8 +78,10 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
offset--;
if (offset > 0) {
var nonWsResult = MagicKeyCompletion (document.GetCharAt (offset), controlSpace);
if (nonWsResult != null)
result = result.Concat (nonWsResult);
if (nonWsResult != null) {
var text = new HashSet<string> (result.Select (r => r.CompletionText));
result = result.Concat (nonWsResult.Where (r => !text.Contains (r.CompletionText)));
}
}
}

Loading…
Cancel
Save