fix(grid): stop FitAddon double-counting pane padding (clipped last row)
The focused grid cell's last terminal row was clipped by the cell border/focus ring at large/maximized window sizes. Root cause (measured in headless Chromium): .term-pane is box-sizing:border-box, so getComputedStyle(pane).height — which xterm's FitAddon reads to compute rows — returns the padding-box height and double-counts the pane's own padding, packing one extra row that overruns the border (overflow +6px). Fix: box-sizing:content-box on the grid pane so the height reports the content box; FitAddon drops the phantom row and the 6px bottom padding becomes real clearance. Verified overflow +6 → −10px (16px clear) at grid-4/grid-6, 1920×1200 (DPR 1 & 2), unchanged at 1200×800. Single mode untouched.
This commit is contained in:
@@ -357,6 +357,18 @@ body {
|
|||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
}
|
}
|
||||||
|
/* Keep the last terminal row clear of the cell border/focus ring in a grid.
|
||||||
|
* Root cause (measured): the base .term-pane is box-sizing:border-box, so
|
||||||
|
* getComputedStyle(pane).height — which xterm's FitAddon reads to compute rows —
|
||||||
|
* returns the PADDING-box height and double-counts the pane's own padding, packing
|
||||||
|
* one extra row that overruns into the border (overflow +6px). content-box makes
|
||||||
|
* that height report the CONTENT box, so FitAddon drops the phantom row and the 6px
|
||||||
|
* padding becomes real clearance. (Single mode keeps padding 0 so the terminal
|
||||||
|
* still fills to the key-bar.) */
|
||||||
|
#term.grid .term-pane {
|
||||||
|
box-sizing: content-box;
|
||||||
|
padding-bottom: 6px;
|
||||||
|
}
|
||||||
/* Maximized quadrant fills the whole grid as an ABSOLUTE overlay (taken out of
|
/* Maximized quadrant fills the whole grid as an ABSOLUTE overlay (taken out of
|
||||||
* grid flow so the siblings keep their placement — spanning grid tracks instead
|
* grid flow so the siblings keep their placement — spanning grid tracks instead
|
||||||
* would shove auto-placed siblings into implicit rows, resizing their live PTYs).
|
* would shove auto-placed siblings into implicit rows, resizing their live PTYs).
|
||||||
|
|||||||
Reference in New Issue
Block a user