Skip to content

Commit

Permalink
Add alt buffer to state
Browse files Browse the repository at this point in the history
  • Loading branch information
parisk committed May 27, 2017
1 parent e6eaca4 commit c74a49c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/xterm.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,20 @@ Terminal.prototype.getState = function() {
'cursorBlink', 'disableStdin', 'scrollback', 'tabStopWidth', 'useFlowControl'
];

let normalBuffer = this.lines._array;
let altBuffer = null;

// This means that the alt buffer is active
if (this.normal) {
altBuffer = normalBuffer;
normalBuffer = this.normal.lines._array;
}

let state = {
buffer: this.lines._array,
buffers: {
normal: normalBuffer,
alt: altBuffer
},
cursor: this._getCursor(),
geometry: this.geometry,
mode: this._getMode(),
Expand Down

0 comments on commit c74a49c

Please sign in to comment.