MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / normalizeSelectionRange

Function normalizeSelectionRange

packages/core/src/runtime/inputEditor.ts:456–460  ·  view source on GitHub ↗
(selection: InputSelection)

Source from the content-addressed store, hash-verified

454}
455
456function normalizeSelectionRange(selection: InputSelection): readonly [number, number] {
457 return selection.start <= selection.end
458 ? [selection.start, selection.end]
459 : [selection.end, selection.start];
460}
461
462function resolveSelectionAnchor(selection: InputSelection, cursor: number): number {
463 if (cursor === selection.start) return selection.end;

Callers 1

applyInputEditEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected