Merge branch 'master' into updated_wcwidth

This commit is contained in:
Daniel Imms
2019-12-07 13:32:13 -08:00
committed by GitHub
8 changed files with 19 additions and 7 deletions
+5
View File
@@ -20,6 +20,7 @@ export const DEFAULT_OPTIONS: ITerminalOptions = Object.freeze({
rows: 24,
cursorBlink: false,
cursorStyle: 'block',
cursorWidth: 1,
bellSound: DEFAULT_BELL_SOUND,
bellStyle: 'none',
drawBoldTextInBrightColors: true,
@@ -112,6 +113,9 @@ export class OptionsService implements IOptionsService {
value = DEFAULT_OPTIONS[key];
}
break;
case 'cursorWidth':
value = Math.floor(value);
// Fall through for bounds check
case 'lineHeight':
case 'tabStopWidth':
if (value < 1) {
@@ -120,6 +124,7 @@ export class OptionsService implements IOptionsService {
break;
case 'minimumContrastRatio':
value = Math.max(1, Math.min(21, Math.round(value * 10) / 10));
break;
case 'scrollback':
value = Math.min(value, 4294967295);
if (value < 0) {
+2
View File
@@ -191,6 +191,7 @@ export interface IPartialTerminalOptions {
cols?: number;
cursorBlink?: boolean;
cursorStyle?: 'block' | 'underline' | 'bar';
cursorWidth?: number;
disableStdin?: boolean;
drawBoldTextInBrightColors?: boolean;
fastScrollModifier?: 'alt' | 'ctrl' | 'shift';
@@ -224,6 +225,7 @@ export interface ITerminalOptions {
cols: number;
cursorBlink: boolean;
cursorStyle: 'block' | 'underline' | 'bar';
cursorWidth: number;
disableStdin: boolean;
drawBoldTextInBrightColors: boolean;
fastScrollModifier: 'alt' | 'ctrl' | 'shift' | undefined;