MCPcopy Index your code
hub / github.com/codeaashu/claude-code / backspace

Method backspace

src/server/web/public/terminal.js:2842–2852  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2840 return this._activeBuffer.x = 0, true;
2841 }
2842 backspace() {
2843 var _a;
2844 if (!this._coreService.decPrivateModes.reverseWraparound) return this._restrictCursor(), this._activeBuffer.x > 0 && this._activeBuffer.x--, true;
2845 if (this._restrictCursor(this._bufferService.cols), this._activeBuffer.x > 0) this._activeBuffer.x--;
2846 else if (0 === this._activeBuffer.x && this._activeBuffer.y > this._activeBuffer.scrollTop && this._activeBuffer.y <= this._activeBuffer.scrollBottom && ((_a = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)) == null ? void 0 : _a.isWrapped)) {
2847 this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = false, this._activeBuffer.y--, this._activeBuffer.x = this._bufferService.cols - 1;
2848 const e3 = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
2849 e3.hasWidth(this._activeBuffer.x) && !e3.hasContent(this._activeBuffer.x) && this._activeBuffer.x--;
2850 }
2851 return this._restrictCursor(), true;
2852 }
2853 tab() {
2854 if (this._activeBuffer.x >= this._bufferService.cols) return true;
2855 const e3 = this._activeBuffer.x;

Callers 1

constructorMethod · 0.95

Calls 4

_restrictCursorMethod · 0.95
hasWidthMethod · 0.80
hasContentMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected