Merge pull request #852 from Tyriar/851_negative_tab_stop_width
Fix crash on negative tab stop width
This commit is contained in:
@@ -438,6 +438,12 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
|||||||
throw new Error('No option with key "' + key + '"');
|
throw new Error('No option with key "' + key + '"');
|
||||||
}
|
}
|
||||||
switch (key) {
|
switch (key) {
|
||||||
|
case 'tabStopWidth':
|
||||||
|
if (value < 1) {
|
||||||
|
console.warn(`tabStopWidth cannot be less than 1, value: ${value}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'scrollback':
|
case 'scrollback':
|
||||||
if (value < this.rows) {
|
if (value < this.rows) {
|
||||||
let msg = 'Setting the scrollback value less than the number of rows ';
|
let msg = 'Setting the scrollback value less than the number of rows ';
|
||||||
|
|||||||
Reference in New Issue
Block a user