Merge from vscode 70dc55955d586ebd427658b43cdb344f2047f9c2 (#6789)

This commit is contained in:
Anthony Dresser
2019-08-16 21:47:46 -07:00
committed by GitHub
parent fb26126bcb
commit 41d8663b09
79 changed files with 1815 additions and 572 deletions

View File

@@ -168,13 +168,14 @@ class InsertSnippetAction extends EditorAction {
return quickInputService.pick(picks, { matchOnDetail: true }).then(pick => resolve(pick && pick.snippet), reject);
}
}).then(async snippet => {
if (!snippet) {
return;
}
let clipboardText: string | undefined;
if (snippet.needsClipboard) {
clipboardText = await clipboardService.readText();
}
if (snippet) {
SnippetController2.get(editor).insert(snippet.codeSnippet, { clipboardText });
}
SnippetController2.get(editor).insert(snippet.codeSnippet, { clipboardText });
});
}
}