MCPcopy Create free account
hub / github.com/Marus/cortex-debug / resetOptions

Method resetOptions

src/frontend/pty.ts:139–152  ·  view source on GitHub ↗
(opts: IPtyTerminalOptions)

Source from the content-addressed store, hash-verified

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)) {

Callers 2

constructorMethod · 0.95
tryReuseMethod · 0.80

Calls 3

unPromptMethod · 0.95
writeMethod · 0.95
killMethod · 0.45

Tested by

no test coverage detected