Skip to content

Commit f2207f4

Browse files
authored
Stop trying to de-duplicate completion results (#3897)
1 parent ff4bbd5 commit f2207f4

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

PSReadLine/Completion.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -298,31 +298,6 @@ private CommandCompletion GetCompletions()
298298
var length = _tabCompletions.ReplacementLength;
299299
if (start < 0 || start > _singleton._buffer.Length) return null;
300300
if (length < 0 || length > (_singleton._buffer.Length - start)) return null;
301-
302-
if (_tabCompletions.CompletionMatches.Count > 1)
303-
{
304-
// Filter out apparent duplicates -- the 'ListItemText' is exactly the same.
305-
var hashSet = new HashSet<string>();
306-
var matches = _tabCompletions.CompletionMatches;
307-
List<int> indices = null;
308-
309-
for (int i = 0; i < matches.Count; i++)
310-
{
311-
if (!hashSet.Add(matches[i].ListItemText))
312-
{
313-
indices ??= new List<int>();
314-
indices.Add(i);
315-
}
316-
}
317-
318-
if (indices is not null)
319-
{
320-
for (int i = indices.Count - 1; i >= 0; i--)
321-
{
322-
matches.RemoveAt(indices[i]);
323-
}
324-
}
325-
}
326301
}
327302
catch (Exception)
328303
{

0 commit comments

Comments
 (0)