forked from xtermjs/xterm.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add todo to split this issue on the tasks and preparing to merge with x…
- Loading branch information
1 parent
3774b53
commit 0101977
Showing
3 changed files
with
28 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
/** | ||
* @license MIT | ||
* @author Paris Kasidiaris | ||
* [email protected] | ||
*/ | ||
|
||
import { ITerminal } from './Interfaces'; | ||
import { Buffer } from './Buffer'; | ||
import {EventEmitter} from './EventEmitter'; | ||
|
||
export class BufferSet { | ||
export class BufferSet extends EventEmitter { | ||
private _normal: Buffer; | ||
private _alt: Buffer; | ||
private _activeBuffer: Buffer; | ||
|
||
constructor(private _terminal: ITerminal) { | ||
super(); | ||
this._normal = new Buffer(this._terminal); | ||
this._alt = new Buffer(this._terminal); | ||
this._activeBuffer = this._normal; | ||
|
@@ -36,9 +40,13 @@ export class BufferSet { | |
|
||
public activateNormalBuffer(): void { | ||
this._activeBuffer = this._normal; | ||
this.resetTerminal(); | ||
this.emit('activate', this._normal); | ||
} | ||
|
||
public activateAltBuffer(): void { | ||
this._activeBuffer = this._normal; | ||
this.resetTerminal(); | ||
this.emit('activate', this._normal); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters