Merge pull request #852 from Tyriar/851_negative_tab_stop_width

Fix crash on negative tab stop width
This commit is contained in:
Daniel Imms
2017-08-07 01:22:13 -07:00
committed by GitHub
+6
View File
@@ -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 ';