respect DECSTBM margins in DECOM mode

This commit is contained in:
Jörg Breitbart
2019-07-08 23:09:53 +02:00
parent cb25e2d4e0
commit e91c223bb0
2 changed files with 17 additions and 4 deletions
+14 -2
View File
@@ -615,11 +615,23 @@ export class InputHandler extends Disposable implements IInputHandler {
} else if (this._terminal.buffer.y >= this._terminal.rows) {
this._terminal.buffer.y = this._terminal.rows - 1;
}
if (this._terminal.originMode) {
if (this._terminal.buffer.y < this._terminal.buffer.scrollTop) {
this._terminal.buffer.y = this._terminal.buffer.scrollTop;
} else if (this._terminal.buffer.y > this._terminal.buffer.scrollBottom) {
this._terminal.buffer.y = this._terminal.buffer.scrollBottom;
}
}
}
private _setCursor(x: number, y: number): void {
this._terminal.buffer.x = x;
this._terminal.buffer.y = y;
if (this._terminal.originMode) {
this._terminal.buffer.x = x;
this._terminal.buffer.y = this._terminal.buffer.scrollTop + y;
} else {
this._terminal.buffer.x = x;
this._terminal.buffer.y = y;
}
this._restrictCursor();
}