Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/AliasManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,6 @@ public void UpdateAlias(string commandId, CommandAlias? newAlias)
return;
}

// If we already have _this exact alias_, do nothing
if (newAlias != null &&
_aliases.TryGetValue(newAlias.SearchPrefix, out var existingAlias))
{
if (existingAlias.CommandId == commandId)
{
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain a bit why removing this duplicate check fixes duplicated aliases

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WAIT A

okay thank you for the sanity check.

This doesn't!

This was actually already fixed in #38193. I just forgot that fix happened, commented out this block, didn't see the bug, and was like "damn I'm so talented".

I'll clean all these reports up.

}
}

// Look for the old alias, and remove it
List<CommandAlias> toRemove = [];
foreach (var kv in _aliases)
Expand Down
Loading