From 0decd77253202c2559805833b1ecc5e5df82b5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Breitbart?= Date: Mon, 23 Apr 2018 16:59:55 +0200 Subject: [PATCH] map Buffer.lines directly to Buffer._lines --- src/Buffer.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Buffer.ts b/src/Buffer.ts index c1cf3cc7..0689c4cf 100644 --- a/src/Buffer.ts +++ b/src/Buffer.ts @@ -34,6 +34,7 @@ export class Buffer implements IBuffer { public savedY: number; public savedX: number; public markers: Marker[] = []; + public lines: CircularList; /** * Create a new Buffer. @@ -48,10 +49,6 @@ export class Buffer implements IBuffer { this.clear(); } - public get lines(): CircularList { - return this._lines; - } - public get hasScrollback(): boolean { return this._hasScrollback && this.lines.maxLength > this._terminal.rows; } @@ -98,6 +95,7 @@ export class Buffer implements IBuffer { this.y = 0; this.x = 0; this._lines = new CircularList(this._getCorrectBufferLength(this._terminal.rows)); + this.lines = this._lines; this.scrollTop = 0; this.scrollBottom = this._terminal.rows - 1; this.setupTabStops();