Merge VS Code 1.23.1 (#1520)

This commit is contained in:
Matt Irvine
2018-06-05 11:24:51 -07:00
committed by GitHub
parent e3baf5c443
commit 0c58f09e59
3651 changed files with 74249 additions and 48599 deletions

View File

@@ -7,10 +7,6 @@
"engines": {
"vscode": "^1.0.0"
},
"categories": [
"Languages",
"Other"
],
"activationEvents": [
"onLanguage:json",
"onLanguage:jsonc"

View File

@@ -70,7 +70,12 @@ function autoFixSettingsJSON(willSaveEvent: vscode.TextDocumentWillSaveEvent): v
onError(error: ParseErrorCode, offset: number, length: number): void {
if (error === ParseErrorCode.CommaExpected && lastEndOfSomething > -1) {
const fixPosition = document.positionAt(lastEndOfSomething);
edit.insert(document.uri, fixPosition, ',');
// Don't insert a comma immediately before a : or ' :'
const colonRange = document.getWordRangeAtPosition(fixPosition, / *:/);
if (!colonRange) {
edit.insert(document.uri, fixPosition, ',');
}
}
}
});