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

Function selectionBounds

src/ink/selection.ts:684–692  ·  view source on GitHub ↗
(s: SelectionState)

Source from the content-addressed store, hash-verified

682 * Returns null if no active selection.
683 */
684export function selectionBounds(s: SelectionState): {
685 start: { col: number; row: number }
686 end: { col: number; row: number }
687} | null {
688 if (!s.anchor || !s.focus) return null
689 return comparePoints(s.anchor, s.focus) <= 0
690 ? { start: s.anchor, end: s.focus }
691 : { start: s.focus, end: s.anchor }
692}
693
694/**
695 * Check if a cell at (col, row) is within the current selection range.

Callers 4

isCellSelectedFunction · 0.85
getSelectedTextFunction · 0.85
captureScrolledRowsFunction · 0.85
applySelectionOverlayFunction · 0.85

Calls 1

comparePointsFunction · 0.85

Tested by

no test coverage detected