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

Function cursorMove

src/ink/termio/csi.ts:169–184  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

167 * Positive y = down, negative y = up
168 */
169export function cursorMove(x: number, y: number): string {
170 let result = ''
171 // Horizontal first (matches ansi-escapes behavior)
172 if (x < 0) {
173 result += cursorBack(-x)
174 } else if (x > 0) {
175 result += cursorForward(x)
176 }
177 // Then vertical
178 if (y < 0) {
179 result += cursorUp(-y)
180 } else if (y > 0) {
181 result += cursorDown(y)
182 }
183 return result
184}
185
186// Save/restore cursor position
187

Callers 2

writeDiffToTerminalFunction · 0.85
onRenderMethod · 0.85

Calls 4

cursorBackFunction · 0.85
cursorForwardFunction · 0.85
cursorUpFunction · 0.85
cursorDownFunction · 0.85

Tested by

no test coverage detected