MCPcopy Create free account
hub / github.com/coder/ghostty-web / generateCursorMovement

Function generateCursorMovement

bench/versus.ts:41–50  ·  view source on GitHub ↗
(ops: number)

Source from the content-addressed store, hash-verified

39}
40
41function generateCursorMovement(ops: number): string {
42 let output = '';
43 for (let i = 0; i < ops; i++) {
44 output += `\x1b[${(i % 24) + 1};${(i % 80) + 1}H`; // Cursor position
45 output += `\x1b[K`; // Clear to end of line
46 output += `Text at position ${i}`;
47 output += `\x1b[A\x1b[B\x1b[C\x1b[D`; // Up, Down, Right, Left
48 }
49 return output;
50}
51
52const withTerminals = async (fn: (term: GhosttyTerminal | XTerm) => Promise<void>) => {
53 const ghostty = await Ghostty.load();

Callers 1

versus.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…