5 import { ITerminal } from './Interfaces';
6 import { CircularList } from './utils/CircularList';
9 * This class represents a terminal buffer (an internal state of the terminal)/
12 private _lines: CircularList<any>;
16 * Create a new Buffer.
17 * @param {Terminal} terminal - The terminal the buffer will belong to
18 * @param {number} ydisp - The scroll position of the buffer in the viewport
19 * @param {number} ybase - The scroll position of the y cursor (ybase + y = the y position within the buffer)
20 * @param {number} y - The cursor's y position after ybase
21 * @param {number} x - The cursor's x position after ybase
24 private terminal: ITerminal,
25 public ydisp: number = 0,
26 public ybase: number = 0,
30 this._lines = new CircularList(this.terminal.scrollback);
33 public get lines(): CircularList<any> {