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

Method getSelectionPosition

lib/selection-manager.ts:312–322  ·  view source on GitHub ↗

* Get selection position as buffer range * xterm.js compatible API

()

Source from the content-addressed store, hash-verified

310 * xterm.js compatible API
311 */
312 getSelectionPosition():
313 | { start: { x: number; y: number }; end: { x: number; y: number } }
314 | undefined {
315 const coords = this.normalizeSelection();
316 if (!coords) return undefined;
317
318 return {
319 start: { x: coords.startCol, y: coords.startRow },
320 end: { x: coords.endCol, y: coords.endRow },
321 };
322 }
323
324 /**
325 * Deselect all text

Callers

nothing calls this directly

Calls 1

normalizeSelectionMethod · 0.95

Tested by

no test coverage detected