Interface: IBuffer

Hierarchy

IBuffer

Index

Properties

Methods


Properties

baseY

● baseY: number

Defined in xterm.d.ts:953

The line within the buffer where the top of the bottom page is (when fully scrolled down);


cursorX

● cursorX: number

Defined in xterm.d.ts:942

The x position of the cursor. This ranges between 0 (left side) and Terminal.cols - 1 (right side).


cursorY

● cursorY: number

Defined in xterm.d.ts:936

The y position of the cursor. This ranges between 0 (when the cursor is at baseY) and Terminal.rows - 1 (when the cursor is on the last row).


length

● length: number

Defined in xterm.d.ts:958

The amount of lines in the buffer.


viewportY

● viewportY: number

Defined in xterm.d.ts:947

The line within the buffer where the top of the viewport is.


Methods

getLine

getLine(y: number): IBufferLine | undefined

Defined in xterm.d.ts:968

Gets a line from the buffer, or undefined if the line index does not exist.

Note that the result of this function should be used immediately after calling as when the terminal updates it could lead to unexpected behavior.

Parameters:

Name Type Description
y number The line index to get.

Returns: IBufferLine | undefined