File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export class Terminal implements ITerminalApi {
1818 private _core : ITerminal ;
1919 private _addonManager : AddonManager ;
2020 private _parser : IParser | undefined ;
21+ private _buffer : BufferNamespaceApi | undefined ;
2122
2223 constructor ( options ?: ITerminalOptions ) {
2324 this . _core = new TerminalCore ( options ) ;
@@ -58,7 +59,10 @@ export class Terminal implements ITerminalApi {
5859 public get cols ( ) : number { return this . _core . cols ; }
5960 public get buffer ( ) : IBufferNamespaceApi {
6061 this . _checkProposedApi ( ) ;
61- return new BufferNamespaceApi ( this . _core . buffers ) ;
62+ if ( ! this . _buffer ) {
63+ return new BufferNamespaceApi ( this . _core . buffers ) ;
64+ }
65+ return this . _buffer ;
6266 }
6367 public get markers ( ) : ReadonlyArray < IMarker > {
6468 this . _checkProposedApi ( ) ;
You can’t perform that action at this time.
0 commit comments