Snippet insertion extension API changes

- Basing snippet insertion failure on a new `_codeEditor` null-check.
- Now returns `Thenable<boolean>`.
- Removed vscode.proposed.d.ts copy of the `TextEditor` change.
- Removing empty options interface.
This commit is contained in:
Joel Day
2017-01-18 10:13:56 -08:00
parent 95fc03271c
commit c21734fd30
9 changed files with 22 additions and 33 deletions

View File

@@ -41,9 +41,8 @@ suite('editor tests', () => {
.appendText(' snippet');
return withRandomFileEditor('', (editor, doc) => {
editor.edit(snippetString);
return editor.edit(() => {}).then(() => {
return editor.edit(snippetString).then(inserted => {
assert.ok(inserted);
assert.equal(doc.getText(), 'This is a placeholder snippet');
assert.ok(doc.isDirty);
});
@@ -60,9 +59,8 @@ suite('editor tests', () => {
new Position(0, 12)
);
editor.edit(snippetString);
return editor.edit(() => {}).then(() => {
return editor.edit(snippetString).then(inserted => {
assert.ok(inserted);
assert.equal(doc.getText(), 'This has been replaced');
assert.ok(doc.isDirty);
});