diff --git a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/completion/LSContentAssistProcessor.java b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/completion/LSContentAssistProcessor.java index 21f4c7764..0ceda9b93 100644 --- a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/completion/LSContentAssistProcessor.java +++ b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/completion/LSContentAssistProcessor.java @@ -181,10 +181,11 @@ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int this.errorMessage = createErrorMessage(offset, e); return createErrorProposal(offset, e); } catch (InterruptedException e) { - LanguageServerPlugin.logError(e); - this.errorMessage = createErrorMessage(offset, e); - Thread.currentThread().interrupt(); - return createErrorProposal(offset, e); + // The current thread has been interrupted by the AsyncCompletionProposalPopup#cancelFutures to + // indicate that we can stop computing results, because they won't be used anymore. + // Forward cancellation to LS and return dummy result + completionCancellationSupport.cancel(); + return NO_COMPLETION_PROPOSALS; } catch (CancellationException e) { // return the elements already collected, if any }