This commit is contained in:
Alex Dima 2018-03-27 18:33:12 +02:00
parent 3ff0f35fb9
commit 062f3f732d

View file

@ -1652,7 +1652,11 @@ export class EditorOptionsValidator {
renderLineHighlight = _stringSet<'none' | 'gutter' | 'line' | 'all'>(opts.renderLineHighlight, defaults.renderLineHighlight, ['none', 'gutter', 'line', 'all']);
}
const mouseWheelScrollSensitivity = _float(opts.mouseWheelScrollSensitivity, defaults.scrollbar.mouseWheelScrollSensitivity);
let mouseWheelScrollSensitivity = _float(opts.mouseWheelScrollSensitivity, defaults.scrollbar.mouseWheelScrollSensitivity);
if (mouseWheelScrollSensitivity === 0) {
// Disallow 0, as it would prevent/block scrolling
mouseWheelScrollSensitivity = 1;
}
const scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, defaults.scrollbar, mouseWheelScrollSensitivity);
const minimap = this._sanitizeMinimapOpts(opts.minimap, defaults.minimap);