提交 c7c7bb0a 编写于 作者: C Cyrus Najmabadi

Simplify and add comment.

上级 17a4ca5f
......@@ -66,10 +66,13 @@ protected virtual bool BlockOverlapsHiddenPosition(SyntaxNode block, Cancellatio
var (category, actions) = await CreateActionsAsync(state, cancellationToken).ConfigureAwait(false);
if (actions.Length > 0)
{
var topLevelAction = new CodeActionWithNestedActions(
category, actions, isInlinable: true);
return topLevelAction;
// We may end up creating a lot of viable code actions for the selected
// piece of code. Create a top level code action so that we don't overwhelm
// the light bulb if there are a lot of other options in the list. Set
// the code action as 'inlinable' so that if the lightbulb is not cluttered
// then the nested items can just be lifted into it, giving the user fast
// access to them.
return new CodeActionWithNestedActions(category, actions, isInlinable: true);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册