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

Method _restrictCursor

src/server/web/public/terminal.js:2864–2866  ·  view source on GitHub ↗
(e3 = this._bufferService.cols - 1)

Source from the content-addressed store, hash-verified

2862 return this._charsetService.setgLevel(0), true;
2863 }
2864 _restrictCursor(e3 = this._bufferService.cols - 1) {
2865 this._activeBuffer.x = Math.min(e3, Math.max(0, this._activeBuffer.x)), this._activeBuffer.y = this._coreService.decPrivateModes.origin ? Math.min(this._activeBuffer.scrollBottom, Math.max(this._activeBuffer.scrollTop, this._activeBuffer.y)) : Math.min(this._bufferService.rows - 1, Math.max(0, this._activeBuffer.y)), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
2866 }
2867 _setCursor(e3, t3) {
2868 this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._coreService.decPrivateModes.origin ? (this._activeBuffer.x = e3, this._activeBuffer.y = this._activeBuffer.scrollTop + t3) : (this._activeBuffer.x = e3, this._activeBuffer.y = t3), this._restrictCursor(), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
2869 }

Callers 13

backspaceMethod · 0.95
_setCursorMethod · 0.95
_moveCursorMethod · 0.95
eraseInDisplayMethod · 0.95
eraseInLineMethod · 0.95
insertLinesMethod · 0.95
deleteLinesMethod · 0.95
insertCharsMethod · 0.95
deleteCharsMethod · 0.95
eraseCharsMethod · 0.95
restoreCursorMethod · 0.95
indexMethod · 0.95

Calls 2

maxMethod · 0.80
markDirtyMethod · 0.45

Tested by

no test coverage detected