Buffer class
Methods
backspace ()
→ void
clear ()
→ void
Clears the viewport and scrollback buffer. Then fill with empty lines.
clearScrollback ()
→ void
Remove all lines above the top of the viewport.
cursorGoForward ()
→ void
deleteChars (int count )
→ void
deleteLines (int count )
→ void
Remove count
lines starting at the current cursor position. Lines below
the removed lines are shifted up. This only affects the scrollable region.
Lines outside the scrollable region are not affected.
eraseChars (int count )
→ void
Erases count
cells starting at the cursor position.
eraseDisplay ()
→ void
Erases the whole viewport.
eraseDisplayFromCursor ()
→ void
Erases the viewport from the cursor position to the end of the buffer,
including the cursor position.
eraseDisplayToCursor ()
→ void
Erases the viewport from the top-left corner to the cursor, including the
cursor.
eraseLine ()
→ void
Erases the line at the current cursor position.
eraseLineFromCursor ()
→ void
Erases the line from the cursor to the end of the line, including the
cursor position.
eraseLineToCursor ()
→ void
Erases the line from the start of the line to the cursor, including the
cursor.
getText ([BufferRange ? range ])
→ String
Get the plain text content of the buffer including the scrollback.
Accepts an optional range
to get a specific part of the buffer.
getWordBoundary (CellOffset position )
→ BufferRangeLine ?
index ()
→ void
https://vt100.net/docs/vt100-ug/chapter3.html#IND IND – Index
insertBlankChars (int count )
→ void
insertLines (int count )
→ void
lineFeed ()
→ void
moveCursor (int offsetX , int offsetY )
→ void
moveCursorX (int offset )
→ void
moveCursorY (int offset )
→ void
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetVerticalMargins ()
→ void
resize (int oldWidth , int oldHeight , int newWidth , int newHeight )
→ void
restoreCursor ()
→ void
Restore cursor position, charmap and text attributes.
reverseIndex ()
→ void
https://terminalguide.namepad.de/seq/a_esc_cm/
saveCursor ()
→ void
Save cursor position, charmap and text attributes.
scrollDown (int lines )
→ void
scrollUp (int lines )
→ void
setCursor (int cursorX , int cursorY )
→ void
setCursorX (int cursorX )
→ void
setCursorY (int cursorY )
→ void
setVerticalMargins (int top , int bottom )
→ void
Sets the vertical scrolling margin to top
and bottom
.
Both values must be between 0 and viewHeight - 1.
toString ()
→ String
Returns a debug representation of the buffer.
override
write (String text )
→ void
Writes data to the _terminal. Terminal sequences or special characters are
not interpreted and directly added to the buffer.
writeChar (int codePoint )
→ void
Writes a single character to the _terminal. Escape sequences or special
characters are not interpreted and directly added to the buffer.