Skip to content

Commit fbe0c01

Browse files
authored
Don't handle local documentation comment commands in the cloud (#47110)
1 parent 59977c1 commit fbe0c01

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/EditorFeatures/Core/Implementation/DocumentationComments/AbstractDocumentationCommentCommandHandler.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ public void ExecuteCommand(TypeCharCommandArgs args, Action nextHandler, Command
118118
return;
119119
}
120120

121+
// Don't execute in cloud environment, as we let LSP handle that
122+
if (args.SubjectBuffer.IsInCloudEnvironmentClientContext())
123+
{
124+
return;
125+
}
126+
121127
CompleteComment(args.SubjectBuffer, args.TextView, InsertOnCharacterTyped, CancellationToken.None);
122128
}
123129

@@ -126,6 +132,12 @@ public CommandState GetCommandState(ReturnKeyCommandArgs args)
126132

127133
public bool ExecuteCommand(ReturnKeyCommandArgs args, CommandExecutionContext context)
128134
{
135+
// Don't execute in cloud environment, as we let LSP handle that
136+
if (args.SubjectBuffer.IsInCloudEnvironmentClientContext())
137+
{
138+
return false;
139+
}
140+
129141
// Check to see if the current line starts with exterior trivia. If so, we'll take over.
130142
// If not, let the nextHandler run.
131143

0 commit comments

Comments
 (0)