Skip to content

Commit

Permalink
Fix optional insert text completions
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Mar 13, 2018
1 parent dec9d8f commit 2678fff
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions extensions/typescript/src/features/completionItemProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,13 @@ class MyCompletionItem extends vscode.CompletionItem {
}

if (tsEntry.kindModifiers && tsEntry.kindModifiers.match(/\boptional\b/)) {
this.insertText = this.label;
this.filterText = this.label;
if (!this.insertText) {
this.insertText = this.label;
}

if (!this.filterText) {
this.filterText = this.label;
}
this.label += '?';
}
}
Expand Down

0 comments on commit 2678fff

Please sign in to comment.