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

Function setSelectionAbsolute

lib/selection-manager.test.ts:22–34  ·  view source on GitHub ↗

* Helper to set selection using absolute coordinates

(
  term: Terminal,
  startCol: number,
  startAbsRow: number,
  endCol: number,
  endAbsRow: number
)

Source from the content-addressed store, hash-verified

20 * Helper to set selection using absolute coordinates
21 */
22function setSelectionAbsolute(
23 term: Terminal,
24 startCol: number,
25 startAbsRow: number,
26 endCol: number,
27 endAbsRow: number
28): void {
29 const selMgr = (term as any).selectionManager;
30 if (selMgr) {
31 (selMgr as any).selectionStart = { col: startCol, absoluteRow: startAbsRow };
32 (selMgr as any).selectionEnd = { col: endCol, absoluteRow: endAbsRow };
33 }
34}
35
36/**
37 * Helper to convert viewport row to absolute row

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…