Merge from vscode 79a1f5a5ca0c6c53db617aa1fa5a2396d2caebe2

This commit is contained in:
ADS Merger
2020-05-31 19:47:51 +00:00
parent 84492049e8
commit 28be33cfea
913 changed files with 28242 additions and 15549 deletions

View File

@@ -79,7 +79,7 @@ export class KeybindingsEditingService extends Disposable implements IKeybinding
if (keybindingItem.isDefault && keybindingItem.resolvedKeybinding) {
this.removeDefaultKeybinding(keybindingItem, model);
}
return this.save().then(() => reference.dispose());
return this.save().finally(() => reference.dispose());
});
}
@@ -92,7 +92,7 @@ export class KeybindingsEditingService extends Disposable implements IKeybinding
} else {
this.removeUserKeybinding(keybindingItem, model);
}
return this.save().then(() => reference.dispose());
return this.save().finally(() => reference.dispose());
});
}
@@ -104,7 +104,7 @@ export class KeybindingsEditingService extends Disposable implements IKeybinding
this.removeUserKeybinding(keybindingItem, model);
this.removeUnassignedDefaultKeybinding(keybindingItem, model);
}
return this.save().then(() => reference.dispose());
return this.save().finally(() => reference.dispose());
});
}
@@ -230,10 +230,12 @@ export class KeybindingsEditingService extends Disposable implements IKeybinding
if (model.getValue()) {
const parsed = this.parse(model);
if (parsed.parseErrors.length) {
reference.dispose();
return Promise.reject<any>(new Error(localize('parseErrors', "Unable to write to the keybindings configuration file. Please open it to correct errors/warnings in the file and try again.")));
}
if (parsed.result) {
if (!isArray(parsed.result)) {
reference.dispose();
return Promise.reject<any>(new Error(localize('errorInvalidConfiguration', "Unable to write to the keybindings configuration file. It has an object which is not of type Array. Please open the file to clean up and try again.")));
}
} else {