Floor cursorWidth to ensure it's an integer
This commit is contained in:
@@ -112,6 +112,9 @@ export class OptionsService implements IOptionsService {
|
|||||||
value = DEFAULT_OPTIONS[key];
|
value = DEFAULT_OPTIONS[key];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'cursorWidth':
|
||||||
|
value = Math.floor(value);
|
||||||
|
// Fall through for bounds check
|
||||||
case 'lineHeight':
|
case 'lineHeight':
|
||||||
case 'tabStopWidth':
|
case 'tabStopWidth':
|
||||||
if (value < 1) {
|
if (value < 1) {
|
||||||
@@ -120,6 +123,7 @@ export class OptionsService implements IOptionsService {
|
|||||||
break;
|
break;
|
||||||
case 'minimumContrastRatio':
|
case 'minimumContrastRatio':
|
||||||
value = Math.max(1, Math.min(21, Math.round(value * 10) / 10));
|
value = Math.max(1, Math.min(21, Math.round(value * 10) / 10));
|
||||||
|
break;
|
||||||
case 'scrollback':
|
case 'scrollback':
|
||||||
value = Math.min(value, 4294967295);
|
value = Math.min(value, 4294967295);
|
||||||
if (value < 0) {
|
if (value < 0) {
|
||||||
@@ -127,7 +131,6 @@ export class OptionsService implements IOptionsService {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'fastScrollSensitivity':
|
case 'fastScrollSensitivity':
|
||||||
case 'cursorWidth':
|
|
||||||
case 'scrollSensitivity':
|
case 'scrollSensitivity':
|
||||||
if (value <= 0) {
|
if (value <= 0) {
|
||||||
throw new Error(`${key} cannot be less than or equal to 0, value: ${value}`);
|
throw new Error(`${key} cannot be less than or equal to 0, value: ${value}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user