Skip to content

Commit bd119b3

Browse files
committed
Ignore cancellation of completion requests
Resolves #4582.
1 parent 759a88f commit bd119b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/PowerShellEditorServices/Services/TextDocument/Handlers/CompletionHandler.cs

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ public override async Task<CompletionList> Handle(CompletionParams request, Canc
8282
// (typically files) returned by the space completion
8383
return new CompletionList(completionResults, isIncomplete || request?.Context?.TriggerCharacter is " ");
8484
}
85+
// Ignore canceled requests (logging will pollute the output).
86+
catch (TaskCanceledException)
87+
{
88+
return new CompletionList(isIncomplete: true);
89+
}
8590
// We can't do anything about completions failing.
8691
catch (Exception e)
8792
{

0 commit comments

Comments
 (0)