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

Method killPrevChar

src/frontend/pty.ts:436–442  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

434 }
435
436 private killPrevChar() {
437 if (this.cursorPos > 1) {
438 this.writeEmitter.fire(ACTIONS.deletePrevChar());
439 this.cursorPos--;
440 this.curLine = PtyTerminal.removeCharAt(this.curLine, this.cursorPos - 1);
441 }
442 }
443
444 private static removeCharAt(str: string, ix: number): string {
445 if (ix === 0) {

Callers 2

handleInputMethod · 0.95
handleSpecialCharsMethod · 0.95

Calls 3

fireMethod · 0.80
deletePrevCharMethod · 0.80
removeCharAtMethod · 0.80

Tested by

no test coverage detected