mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
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 + '"');
|
||||
}
|
||||
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 ';
|
||||
|
||||
Reference in New Issue
Block a user