MCPcopy Create free account
hub / github.com/Effect-TS/effect / cursorMove

Function cursorMove

packages/effect/src/unstable/cli/internal/ansi.ts:93–109  ·  view source on GitHub ↗
(column: number, row: number = 0)

Source from the content-addressed store, hash-verified

91
92/** @internal */
93export const cursorMove = (column: number, row: number = 0): string => {
94 let command = ""
95 if (row < 0) {
96 command += `${ESC}${-row}A`
97 }
98 if (row > 0) {
99 command += `${ESC}${row}B`
100 }
101 if (column > 0) {
102 command += `${ESC}${column}C`
103 }
104 if (column < 0) {
105 command += `${ESC}${-column}D`
106 }
107
108 return command
109}
110
111/** @internal */
112export const eraseLines = (rows: number): string => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected