mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 14:31:31 +01:00
Merge branch 'master' into ben/notifications
This commit is contained in:
@@ -464,7 +464,8 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP
|
||||
let hasAddedParameters = false;
|
||||
|
||||
const snippet = new SnippetString();
|
||||
snippet.appendText(item.label || item.insertText as string);
|
||||
const methodName = detail.displayParts.find(part => part.kind === 'methodName');
|
||||
snippet.appendText((methodName && methodName.text) || item.label || item.insertText as string);
|
||||
snippet.appendText('(');
|
||||
|
||||
let parenCount = 0;
|
||||
|
||||
@@ -170,6 +170,12 @@ class TryCompleteJsDocCommand implements Command {
|
||||
if (!res || !res.body) {
|
||||
return undefined;
|
||||
}
|
||||
// Workaround for #43619
|
||||
// docCommentTemplate previously returned undefined for empty jsdoc templates.
|
||||
// TS 2.7 now returns a single line doc comment, which breaks indentation.
|
||||
if (res.body.newText === '/** */') {
|
||||
return undefined;
|
||||
}
|
||||
return TryCompleteJsDocCommand.templateToSnippet(res.body.newText);
|
||||
}, () => undefined);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user