Fixes #102920
This commit is contained in:
parent
3d0d50caf8
commit
a5aa8f5456
4 changed files with 18 additions and 7 deletions
|
@ -381,7 +381,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements IC
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (typeof baseValue === 'object' && typeof subsetValue === 'object') {
|
if (baseValue && typeof baseValue === 'object' && subsetValue && typeof subsetValue === 'object') {
|
||||||
if (!this._subsetEquals(baseValue, subsetValue)) {
|
if (!this._subsetEquals(baseValue, subsetValue)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2572,9 +2572,9 @@ class EditorPixelRatio extends ComputedEditorOption<EditorOption.pixelRatio, num
|
||||||
* Configuration options for quick suggestions
|
* Configuration options for quick suggestions
|
||||||
*/
|
*/
|
||||||
export interface IQuickSuggestionsOptions {
|
export interface IQuickSuggestionsOptions {
|
||||||
other: boolean;
|
other?: boolean;
|
||||||
comments: boolean;
|
comments?: boolean;
|
||||||
strings: boolean;
|
strings?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ValidQuickSuggestionsOptions = boolean | Readonly<Required<IQuickSuggestionsOptions>>;
|
export type ValidQuickSuggestionsOptions = boolean | Readonly<Required<IQuickSuggestionsOptions>>;
|
||||||
|
|
|
@ -211,4 +211,15 @@ suite('Common Editor Config', () => {
|
||||||
strings: false
|
strings: false
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('issue #102920: Can\'t snap or split view with JSON files', () => {
|
||||||
|
const config = new TestConfiguration({ quickSuggestions: null! });
|
||||||
|
config.updateOptions({ quickSuggestions: { strings: true } });
|
||||||
|
const actual = <Readonly<Required<IQuickSuggestionsOptions>>>config.options.get(EditorOption.quickSuggestions);
|
||||||
|
assert.deepEqual(actual, {
|
||||||
|
other: true,
|
||||||
|
comments: false,
|
||||||
|
strings: true
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
6
src/vs/monaco.d.ts
vendored
6
src/vs/monaco.d.ts
vendored
|
@ -3557,9 +3557,9 @@ declare namespace monaco.editor {
|
||||||
* Configuration options for quick suggestions
|
* Configuration options for quick suggestions
|
||||||
*/
|
*/
|
||||||
export interface IQuickSuggestionsOptions {
|
export interface IQuickSuggestionsOptions {
|
||||||
other: boolean;
|
other?: boolean;
|
||||||
comments: boolean;
|
comments?: boolean;
|
||||||
strings: boolean;
|
strings?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ValidQuickSuggestionsOptions = boolean | Readonly<Required<IQuickSuggestionsOptions>>;
|
export type ValidQuickSuggestionsOptions = boolean | Readonly<Required<IQuickSuggestionsOptions>>;
|
||||||
|
|
Loading…
Reference in a new issue