[issue #164] Fix bug that can occur when setting a scroll region

This commit is contained in:
Lucian Buzzo
2017-01-27 11:25:12 +00:00
parent d1ad8a7831
commit 23c9fca088
+1 -1
View File
@@ -1446,7 +1446,7 @@ export class InputHandler implements IInputHandler {
public setScrollRegion(params: number[]): void {
if (this._terminal.prefix) return;
this._terminal.scrollTop = (params[0] || 1) - 1;
this._terminal.scrollBottom = (params[1] || this._terminal.rows) - 1;
this._terminal.scrollBottom = (params[1] && params[1] <= this._terminal.rows ? params[1] : this._terminal.rows) - 1;
this._terminal.x = 0;
this._terminal.y = 0;
}