Merge from vscode 1ce89e2cb720d69c496c2815c4696ee4fd4429a6 (#6779)

* Merge from vscode 1ce89e2cb720d69c496c2815c4696ee4fd4429a6

* redisable accounts because of issues
This commit is contained in:
Anthony Dresser
2019-08-15 23:56:46 -07:00
committed by GitHub
parent fb4e3c6a05
commit 6f297efb88
166 changed files with 1941 additions and 1279 deletions

View File

@@ -4692,6 +4692,28 @@ suite('autoClosingPairs', () => {
mode.dispose();
});
test('issue #78975 - Parentheses swallowing does not work when parentheses are inserted by autocomplete', () => {
let mode = new AutoClosingMode();
usingCursor({
text: [
'<div id'
],
languageIdentifier: mode.getLanguageIdentifier()
}, (model, cursor) => {
cursor.setSelections('test', [new Selection(1, 8, 1, 8)]);
cursor.executeEdits('snippet', [{ range: new Range(1, 6, 1, 8), text: 'id=""' }], () => [new Selection(1, 10, 1, 10)]);
assert.strictEqual(model.getLineContent(1), '<div id=""');
cursorCommand(cursor, H.Type, { text: 'a' }, 'keyboard');
assert.strictEqual(model.getLineContent(1), '<div id="a"');
cursorCommand(cursor, H.Type, { text: '"' }, 'keyboard');
assert.strictEqual(model.getLineContent(1), '<div id="a"');
});
mode.dispose();
});
test('issue #15825: accents on mac US intl keyboard', () => {
let mode = new AutoClosingMode();
usingCursor({