Properly setup and maintain tab stops for the alt buffer

Fixes #930
This commit is contained in:
Daniel Imms
2017-08-29 21:08:11 -07:00
parent 38c66e7c1a
commit a57e511fa3
6 changed files with 68 additions and 49 deletions
+11
View File
@@ -28,6 +28,8 @@ export class BufferSet extends EventEmitter implements IBufferSet {
// See http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
this._alt = new Buffer(this._terminal, false);
this._activeBuffer = this._normal;
this.setupTabStops();
}
/**
@@ -87,4 +89,13 @@ export class BufferSet extends EventEmitter implements IBufferSet {
this._normal.resize(newCols, newRows);
this._alt.resize(newCols, newRows);
}
/**
* Setup the tab stops.
* @param i The index to start setting up tab stops from.
*/
public setupTabStops(i?: number): void {
this._normal.setupTabStops(i);
this._alt.setupTabStops(i);
}
}