-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix commit behvaior where items use default commit chars as their special filter char #70743
Conversation
…cial filter char We never handled this correctly but the bug wasn't exposed until operator comptetion was added (where '+', '-', etc. are used as filter chars)
{ | ||
if (session.Properties.TryGetProperty(ExcludedCommitCharacters, out ImmutableArray<char> excludedCommitCharactersBefore)) | ||
foreach (var kvp in excludedCommitCharactersFromList) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think AddRange
is usually associated with list like types in BCL. Maybe we could add a Union
for MultiDictionary
? I can give this a try in a follow up PR since it'd require change in compiler layer. Also import compeltion uses this type extensively so I'd like to take that into consideration too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I just saw that OrderedMultiDictionary has an AddRange, so I thought the name could match that, but Union is fine by me too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, this method must get called on the same session multiple times with different completionList.ItemsList values, right? Just trying to understand if there is a relation between previous values in the ExcludedCommitCharactersMap property and the items returned from GetExcludedCommitCharacters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, currently it could be called twice for a given session to support import completion, as we might delay those unimported item to a second batch w/o showing them until the list refreshed, or if import completion is disabled, it can be explicitly triggered by using the expander button during the same session. Which means the values in the map from before vs after are from two disjoint sets of completion items (unimported item vs everything else).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We never handled this correctly, but the bug wasn't exposed until operator completion was added (where '+', '-', etc. are used as filter chars)
Fix #70732