Commit 7bda168
committed
fix: keep tab-bar margin transitions in sync with hide-if-single
resize_top_or_bottom_line compared the new padding against
dimension.margin, but apply_taffy_layout zeroes dimension.margin on
every run. Once that has happened the "previous" margin reads as zero;
when num_tabs drops to 1 and hide_if_single makes padding_y_top zero
too, the comparison short-circuits and update_scaled_margin is never
called. Compare against the grid's scaled_margin (divided by scale)
instead, since that holds the authoritative current margin.
Without this, closing the second tab with hide-if-single enabled left
the tab-bar strip reserved at the top and terminal content drew below
it instead of filling the freed area.1 parent 9387f24 commit 7bda168
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1580 | 1580 | | |
1581 | 1581 | | |
1582 | 1582 | | |
1583 | | - | |
1584 | | - | |
1585 | 1583 | | |
1586 | 1584 | | |
1587 | 1585 | | |
| |||
1590 | 1588 | | |
1591 | 1589 | | |
1592 | 1590 | | |
1593 | | - | |
1594 | | - | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
1595 | 1601 | | |
1596 | 1602 | | |
1597 | 1603 | | |
| |||
1601 | 1607 | | |
1602 | 1608 | | |
1603 | 1609 | | |
1604 | | - | |
1605 | 1610 | | |
1606 | 1611 | | |
1607 | 1612 | | |
| |||
0 commit comments