Skip to content

Commit

Permalink
Merge pull request #852 from Tyriar/851_negative_tab_stop_width
Browse files Browse the repository at this point in the history
Fix crash on negative tab stop width
  • Loading branch information
Tyriar authored Aug 7, 2017
2 parents a1b91e1 + 26977b3 commit 091854d
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 091854d

Please sign in to comment.