mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 02:48:30 -05:00
Merge from vscode 4d91d96e5e121b38d33508cdef17868bab255eae
This commit is contained in:
committed by
AzureDataStudio
parent
a971aee5bd
commit
5e7071e466
@@ -75,10 +75,10 @@ export class JSONEditingService implements IJSONEditingService {
|
||||
private getEdits(model: ITextModel, configurationValue: IJSONValue): Edit[] {
|
||||
const { tabSize, insertSpaces } = model.getOptions();
|
||||
const eol = model.getEOL();
|
||||
const { key, value } = configurationValue;
|
||||
const { path, value } = configurationValue;
|
||||
|
||||
// Without key, the entire settings file is being replaced, so we just use JSON.stringify
|
||||
if (!key) {
|
||||
// With empty path the entire file is being replaced, so we just use JSON.stringify
|
||||
if (!path.length) {
|
||||
const content = JSON.stringify(value, null, insertSpaces ? strings.repeat(' ', tabSize) : '\t');
|
||||
return [{
|
||||
content,
|
||||
@@ -87,7 +87,7 @@ export class JSONEditingService implements IJSONEditingService {
|
||||
}];
|
||||
}
|
||||
|
||||
return setProperty(model.getValue(), [key], value, { tabSize, insertSpaces, eol });
|
||||
return setProperty(model.getValue(), path, value, { tabSize, insertSpaces, eol });
|
||||
}
|
||||
|
||||
private async resolveModelReference(resource: URI): Promise<IReference<IResolvedTextEditorModel>> {
|
||||
|
||||
Reference in New Issue
Block a user