MCPcopy Create free account
hub / github.com/SplootCode/splootcode / clearTty

Method clearTty

packages/editor/src/runtime/wasm-tty/wasm-tty.ts:138–144  ·  view source on GitHub ↗

* Clears the entire Tty * * This function will erase all the lines that display on the tty, * and move the cursor in the beginning of the first line of the prompt.

()

Source from the content-addressed store, hash-verified

136 * and move the cursor in the beginning of the first line of the prompt.
137 */
138 clearTty() {
139 // Clear the screen
140 this.xterm.write('\u001b[2J')
141 // Set the cursor to 0, 0
142 this.xterm.write('\u001b[0;0H')
143 this.inputCursorX = 0
144 }
145
146 getCurrentInputOffset(): number {
147 return this.inputCursorY * this.xterm.cols + this.inputCursorX - this.inputStartCursorX

Callers 2

PythonFrameClass · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected