(opts: IPtyTerminalOptions)
| 137 | } |
| 138 | |
| 139 | public resetOptions(opts: IPtyTerminalOptions) { |
| 140 | if (this.options.name !== opts.name) { |
| 141 | throw Error('Reset terminal: Terminal name cannot change once created'); |
| 142 | } |
| 143 | if (this.promptTimer) { |
| 144 | this.promptTimer.kill(); |
| 145 | this.promptTimer = null; |
| 146 | } |
| 147 | this.unPrompt(); // This will clear any old prompt |
| 148 | this.options = opts; |
| 149 | this.curLine = ''; |
| 150 | this.cursorPos = 1; |
| 151 | this.write('\n'); // This will write also prompt |
| 152 | } |
| 153 | |
| 154 | protected handleInput(chars: string): void { |
| 155 | if (this.isPaused || (this.options.inputMode === TerminalInputMode.DISABLED)) { |
no test coverage detected