Fix turning from alt screen to normal screen and vice versa. Fix https://github.com/sourcelair/xterm.js/issues/229 .

This commit is contained in:
Aleksandr Andrienko
2017-07-16 03:47:15 +03:00
committed by Paris Kasidiaris
parent 4626e19b75
commit 6810de85e1
3 changed files with 24 additions and 28 deletions
+2 -10
View File
@@ -30,21 +30,13 @@ export class BufferSet extends EventEmitter {
return this._normal;
}
private resetTerminal() {
this._terminal.reset();
this._terminal.viewport.syncScrollArea();
this._terminal.showCursor();
}
public activateNormalBuffer(): void {
this._activeBuffer = this._normal;
this.resetTerminal();
this.emit('activate', this._normal);
this.emit('activate', this._normal); // todo maybe simpler this._terminal.buffer = this._terminal.buffers.normal than using EventEmitter?
}
public activateAltBuffer(): void {
this._activeBuffer = this._alt;
this.resetTerminal();
this.emit('activate', this._alt);
this.emit('activate', this._alt); // todo maybe simpler this._terminal.buffer = this._terminal.buffers.alt than using EventEmitter?
}
}