This commit is contained in:
Bruno Ribeito
2017-11-05 15:11:02 +00:00
parent 3921457bf3
commit b7438d57cf
2 changed files with 8 additions and 2 deletions
+3 -1
View File
@@ -22,7 +22,7 @@
*/
import { BufferSet } from './BufferSet';
import { Buffer } from './Buffer';
import { Buffer, MAX_BUFFER_SIZE } from './Buffer';
import { CompositionHelper } from './CompositionHelper';
import { EventEmitter } from './EventEmitter';
import { Viewport } from './Viewport';
@@ -384,6 +384,8 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
}
break;
case 'scrollback':
value = value > 0 && value <= MAX_BUFFER_SIZE ? value : MAX_BUFFER_SIZE;
if (value < 0) {
console.warn(`${key} cannot be less than 0, value: ${value}`);
return;