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">,
)
| 148 | |
| 149 | /** Bundle the layout inputs needed to measure rows from a shared section row plan. */ |
| 150 | function 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. */ |
| 175 | function measurePlannedDiffSectionRowHeight( |
no outgoing calls
no test coverage detected