(lines, selection)
| 107 | } |
| 108 | |
| 109 | function 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 | |
| 116 | function editorMetrics(layoutMode, viewportRows) { |
| 117 | if (layoutMode === "tiny") { |
no test coverage detected