-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Tweak completion filtering behavior. #2 #16894
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
Tweak completion filtering behavior. #2 #16894
Conversation
| /// Completion was triggered with a request to commit if a unique item would be selected | ||
| /// (ctrl-space in Visual Studio). | ||
| /// </summary> | ||
| InvokeAndCommitIfUnique |
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.
Feedback welcome on the names 'Invoke' and 'InvokeAndCommitIfUnique'.
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.
The VS commands are called list members and complete word. I like complete word but not list members.
|
tagging @dotnet/roslyn-ide This simplifies some of our code around filtering completion lists, moving as much as possible to one location, and providing a very simple API with very few knobs for consumers to get wrong. |
| recheckCaretPosition: false, | ||
| dismissIfEmptyAllowed: dismissIfEmptyAllowed); | ||
| } | ||
| } |
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.
Remove?
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 you're looking at an old review :)
| // moved out of bounds of the items, then we'll dismiss. Also queue up an insertion. | ||
| // that way we go and filter things properly to ensure that the list contains the | ||
| // appropriate items. | ||
| sessionOpt.FilterModel(CompletionFilterReason.CaretPositionChanged, filterState: null); |
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.
nice, lots of cryptic flags removed.
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems?id=362890
This is a more extensive change thatn #16892. Here, we also remove the 'recheckCaretPosition' check since that can be inferred from a FilterReason of 'CaretPositionChanged'.