Skip to content

Commit

Permalink
Ignore cancellation of completion requests
Browse files Browse the repository at this point in the history
Resolves #4582.
  • Loading branch information
andyleejordan committed May 23, 2023
1 parent 759a88f commit bd119b3
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ public override async Task<CompletionList> Handle(CompletionParams request, Canc
// (typically files) returned by the space completion
return new CompletionList(completionResults, isIncomplete || request?.Context?.TriggerCharacter is " ");
}
// Ignore canceled requests (logging will pollute the output).
catch (TaskCanceledException)
{
return new CompletionList(isIncomplete: true);
}
// We can't do anything about completions failing.
catch (Exception e)
{
Expand Down

0 comments on commit bd119b3

Please sign in to comment.