mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
Fix converter
This commit is contained in:
@@ -849,7 +849,10 @@ export namespace CompletionItem {
|
||||
export function to(suggestion: modes.CompletionItem, converter?: CommandsConverter): types.CompletionItem {
|
||||
|
||||
const result = new types.CompletionItem(typeof suggestion.label === 'string' ? suggestion.label : suggestion.label.name);
|
||||
result.label2 = suggestion.label;
|
||||
if (typeof suggestion.label !== 'string') {
|
||||
result.label2 = suggestion.label;
|
||||
}
|
||||
|
||||
result.insertText = suggestion.insertText;
|
||||
result.kind = CompletionItemKind.to(suggestion.kind);
|
||||
result.tags = suggestion.tags && suggestion.tags.map(CompletionItemTag.to);
|
||||
|
||||
@@ -1386,7 +1386,6 @@ export class CompletionItem implements vscode.CompletionItem {
|
||||
|
||||
constructor(label: string, kind?: CompletionItemKind) {
|
||||
this.label = label;
|
||||
this.label2 = { name: label };
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user