-
Notifications
You must be signed in to change notification settings - Fork 396
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
improve magic command completions #3700
Conversation
return subcommandCompletions.Concat(baseCompletions).ToArray(); | ||
completions.AddRange(subcommandCompletions); | ||
|
||
if (Parent is KernelDirective parent) |
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.
Does order in which the completions are added to the list matter? If yes, should the directive-based ones be added first?
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.
It doesn't matter. At this level, the final list hasn't been assembled, so ordering doesn't matter yet, nor does e.g. filtering for partially-typed completions.
|
||
case DirectiveNameNode nameNode when subcommandNode is not null: | ||
subcommandNode.Add(nameNode); | ||
case DirectiveParameterNode parameterNode when subcommandNode is 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.
Is this a duplicate of the case
on line 188 above?
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.
It is! Nice catch.
This fixes a number of cases with magic command completions.