Skip to content

Commit

Permalink
Fix crash on negative tab stop width
Browse files Browse the repository at this point in the history
Fixes #851
  • Loading branch information
Tyriar committed Aug 6, 2017
1 parent 687a5e2 commit 26977b3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ';
Expand Down

0 comments on commit 26977b3

Please sign in to comment.