From 26977b370ecd77e44503c8de1a4e2fb92d547adb Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 6 Aug 2017 13:47:03 -0700 Subject: [PATCH] Fix crash on negative tab stop width Fixes #851 --- src/Terminal.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Terminal.ts b/src/Terminal.ts index cd44e7fb76..d410f51f6e 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -438,6 +438,12 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT throw new Error('No option with key "' + key + '"'); } switch (key) { + case 'tabStopWidth': + if (value < 1) { + console.warn(`tabStopWidth cannot be less than 1, value: ${value}`); + return; + } + break; case 'scrollback': if (value < this.rows) { let msg = 'Setting the scrollback value less than the number of rows ';