* 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.
()
| 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 |
no outgoing calls
no test coverage detected