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

Function normalizeCodeSelection

scripts/hsr/widget-view.mjs:109–114  ·  view source on GitHub ↗
(lines, selection)

Source from the content-addressed store, hash-verified

107}
108
109function normalizeCodeSelection(lines, selection) {
110 if (!selection || typeof selection !== "object") return null;
111 const anchor = clampCodeCursor(lines, selection.anchor);
112 const active = clampCodeCursor(lines, selection.active);
113 return Object.freeze({ anchor, active });
114}
115
116function editorMetrics(layoutMode, viewportRows) {
117 if (layoutMode === "tiny") {

Callers 1

renderEditorPanelFunction · 0.85

Calls 1

clampCodeCursorFunction · 0.90

Tested by

no test coverage detected