Skip to content

Commit 2cfb13d

Browse files
Kapil Borledaviwil
Kapil Borle
authored andcommitted
Fix returning promise from complete() method
1 parent 763618c commit 2cfb13d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/features/HelpCompletion.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ export class HelpCompletionFeature implements IFeature {
5151

5252
// todo raise an event when trigger is found, and attach complete() to the event.
5353
if (this.helpCompletionProvider.triggerFound) {
54-
this.helpCompletionProvider.reset();
55-
this.helpCompletionProvider.complete();
54+
this.helpCompletionProvider.complete().then(() => this.helpCompletionProvider.reset());
5655
}
5756

5857
}
@@ -148,7 +147,7 @@ class HelpCompletionProvider {
148147
let triggerStartPos = this.lastChangeRange.start;
149148
let triggerEndPos = this.lastChangeRange.end;
150149
let doc = this.lastDocument;
151-
this.langClient.sendRequest(
150+
return this.langClient.sendRequest(
152151
CommentHelpRequest.type,
153152
{
154153
documentUri: doc.uri.toString(),

0 commit comments

Comments
 (0)