Adds scrollSensitivity option for scrolling speed

This commit is contained in:
Eric Amodio
2019-10-18 14:30:46 -04:00
parent eb252433ce
commit f445bc763b
5 changed files with 22 additions and 7 deletions
+7
View File
@@ -33,6 +33,7 @@ export const DEFAULT_OPTIONS: ITerminalOptions = Object.freeze({
letterSpacing: 0,
logLevel: 'info',
scrollback: 1000,
scrollSensitivity: 1,
screenReaderMode: false,
macOptionIsMeta: false,
macOptionClickForcesSelection: false,
@@ -121,6 +122,12 @@ export class OptionsService implements IOptionsService {
throw new Error(`${key} cannot be less than 0, value: ${value}`);
}
break;
case 'fastScrollSensitivity':
case 'scrollSensitivity':
if (value <= 0) {
throw new Error(`${key} cannot be less than or equal to 0, value: ${value}`);
}
break;
}
return value;
}