Improve documentation of Buffer and BufferSet classes

This commit is contained in:
Paris Kasidiaris
2017-07-16 03:47:15 +03:00
committed by Paris Kasidiaris
parent f09918f0d2
commit 58b9f712df
2 changed files with 36 additions and 6 deletions
+8 -4
View File
@@ -6,16 +6,20 @@ import { ITerminal } from './Interfaces';
import { CircularList } from './utils/CircularList';
/**
* This class represents a terminal buffer (an internal state of the terminal)/
* This class represents a terminal buffer (an internal state of the terminal), where the
* following information is stored (in high-level):
* - text content of this particular buffer
* - cursor position
* - scroll position
*/
export class Buffer {
public lines: CircularList<[string, number, string]>;
/**
* Create a new Buffer.
* @param {Terminal} terminal - The terminal the buffer will belong to
* @param {number} ydisp - The scroll position of the buffer in the viewport
* @param {number} ybase - The scroll position of the y cursor (ybase + y = the y position within the buffer)
* @param {Terminal} terminal - The terminal the Buffer will belong to
* @param {number} ydisp - The scroll position of the Buffer in the viewport
* @param {number} ybase - The scroll position of the y cursor (ybase + y = the y position within the Buffer)
* @param {number} y - The cursor's y position after ybase
* @param {number} x - The cursor's x position after ybase
*/