diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-03-31 16:03:34 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-03-31 16:03:34 +0300 |
| commit | f826fb78dcac89b4ba23e399ac5d141459c14ae9 (patch) | |
| tree | cce037483769961855ba98612789a3c533b03d2d /src/layout.rs | |
| parent | 79f5f3c2c838af976e1e3823fdeb1aa1d0617ec1 (diff) | |
fix: reserve pane width for visible scrollbars
Diffstat (limited to 'src/layout.rs')
| -rw-r--r-- | src/layout.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/layout.rs b/src/layout.rs index c72456b9..56254f04 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -32,6 +32,8 @@ pub struct PaneInfo { pub rect: Rect, /// Inner rect (content area, excluding borders). Used for selection. pub inner_rect: Rect, + /// Reserved scrollbar lane, when scrollback is visible. + pub scrollbar_rect: Option<Rect>, pub is_focused: bool, } @@ -315,6 +317,7 @@ fn collect_panes(node: &Node, area: Rect, focus: PaneId, result: &mut Vec<PaneIn rect: area, // inner_rect is set during render when we know if borders are shown inner_rect: area, + scrollbar_rect: None, is_focused: *id == focus, }); } |
