Fill the reserved wrapped-row hover column so row backgrounds do not visibly shrink.
(key: string, width: number, bg: string)
| 1265 | |
| 1266 | /** Fill the reserved wrapped-row hover column so row backgrounds do not visibly shrink. */ |
| 1267 | function renderAddNoteSpacer(key: string, width: number, bg: string) { |
| 1268 | if (width <= 0) { |
| 1269 | return null; |
| 1270 | } |
| 1271 | |
| 1272 | return ( |
| 1273 | <box key={key} style={{ width, height: 1 }}> |
| 1274 | <text> |
| 1275 | <span bg={bg}>{" ".repeat(width)}</span> |
| 1276 | </text> |
| 1277 | </box> |
| 1278 | ); |
| 1279 | } |
| 1280 | |
| 1281 | /** Measure how many terminal rows one rendered diff row occupies. */ |
| 1282 | export function measureRenderedRowHeight( |