MCPcopy Index your code
hub / github.com/modem-dev/hunk / buildDiffSectionRowHeightOptions

Function buildDiffSectionRowHeightOptions

src/ui/diff/diffSectionGeometry.ts:150–172  ·  view source on GitHub ↗

Bundle the layout inputs needed to measure rows from a shared section row plan.

(
  rowPlan: DiffSectionRowPlan,
  {
    layout,
    showHunkHeaders,
    showLineNumbers,
    reserveAddNoteColumn,
    theme,
    width,
    wrapLines,
  }: Omit<DiffSectionRowHeightOptions, "lineNumberDigits">,
)

Source from the content-addressed store, hash-verified

148
149/** Bundle the layout inputs needed to measure rows from a shared section row plan. */
150function buildDiffSectionRowHeightOptions(
151 rowPlan: DiffSectionRowPlan,
152 {
153 layout,
154 showHunkHeaders,
155 showLineNumbers,
156 reserveAddNoteColumn,
157 theme,
158 width,
159 wrapLines,
160 }: Omit<DiffSectionRowHeightOptions, "lineNumberDigits">,
161): DiffSectionRowHeightOptions {
162 return {
163 layout,
164 lineNumberDigits: rowPlan.lineNumberDigits,
165 showHunkHeaders,
166 reserveAddNoteColumn,
167 showLineNumbers,
168 theme,
169 width,
170 wrapLines,
171 };
172}
173
174/** Measure how many terminal rows one planned row occupies in a concrete section row plan. */
175function measurePlannedDiffSectionRowHeight(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected