MCPcopy
hub / github.com/codeaashu/claude-code / eraseLines

Function eraseLines

src/ink/termio/csi.ts:239–250  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

237 * This erases each line and moves up, ending at column 1
238 */
239export function eraseLines(n: number): string {
240 if (n <= 0) return ''
241 let result = ''
242 for (let i = 0; i < n; i++) {
243 result += ERASE_LINE
244 if (i < n - 1) {
245 result += cursorUp(1)
246 }
247 }
248 result += CURSOR_LEFT
249 return result
250}
251
252// Scroll
253

Callers 1

writeDiffToTerminalFunction · 0.85

Calls 1

cursorUpFunction · 0.85

Tested by

no test coverage detected