Skip to content

Commit a5aa8f5

Browse files
committed
1 parent 3d0d50c commit a5aa8f5

4 files changed

Lines changed: 18 additions & 7 deletions

File tree

src/vs/editor/common/config/commonEditorConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements IC
381381
}
382382
continue;
383383
}
384-
if (typeof baseValue === 'object' && typeof subsetValue === 'object') {
384+
if (baseValue && typeof baseValue === 'object' && subsetValue && typeof subsetValue === 'object') {
385385
if (!this._subsetEquals(baseValue, subsetValue)) {
386386
return false;
387387
}

src/vs/editor/common/config/editorOptions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2572,9 +2572,9 @@ class EditorPixelRatio extends ComputedEditorOption<EditorOption.pixelRatio, num
25722572
* Configuration options for quick suggestions
25732573
*/
25742574
export interface IQuickSuggestionsOptions {
2575-
other: boolean;
2576-
comments: boolean;
2577-
strings: boolean;
2575+
other?: boolean;
2576+
comments?: boolean;
2577+
strings?: boolean;
25782578
}
25792579

25802580
export type ValidQuickSuggestionsOptions = boolean | Readonly<Required<IQuickSuggestionsOptions>>;

src/vs/editor/test/common/config/commonEditorConfig.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,4 +211,15 @@ suite('Common Editor Config', () => {
211211
strings: false
212212
});
213213
});
214+
215+
test('issue #102920: Can\'t snap or split view with JSON files', () => {
216+
const config = new TestConfiguration({ quickSuggestions: null! });
217+
config.updateOptions({ quickSuggestions: { strings: true } });
218+
const actual = <Readonly<Required<IQuickSuggestionsOptions>>>config.options.get(EditorOption.quickSuggestions);
219+
assert.deepEqual(actual, {
220+
other: true,
221+
comments: false,
222+
strings: true
223+
});
224+
});
214225
});

src/vs/monaco.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3557,9 +3557,9 @@ declare namespace monaco.editor {
35573557
* Configuration options for quick suggestions
35583558
*/
35593559
export interface IQuickSuggestionsOptions {
3560-
other: boolean;
3561-
comments: boolean;
3562-
strings: boolean;
3560+
other?: boolean;
3561+
comments?: boolean;
3562+
strings?: boolean;
35633563
}
35643564

35653565
export type ValidQuickSuggestionsOptions = boolean | Readonly<Required<IQuickSuggestionsOptions>>;

0 commit comments

Comments
 (0)