terminal_view: Ensure reported size does not change once content becomes scrollable (#46648)

This fixes an issue where due to the scrollbar appearing, the reported
content size would shift, causing issues in the process. We now actually
always reserve space for the scrollbar appropriately as described in
https://github.com/zed-industries/zed/pull/33636 initially.

Release Notes:

- Fixed an issue where the scrollbar could cause a layout shift in the
terminal.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This commit is contained in:
Finn EversandDanilo Leal authored and GitHub committed 2026-04-27 22:06:01 +00:00
1 parent baa0ef5427
commit c9e9748a7f
8 files changed
+283 -183

No files matched your search

+1 -2
View File
@@ -1102,8 +1102,7 @@ impl<D: PickerDelegate> Render for Picker<D> {
.children(self.delegate.render_header(window, cx))
.child(self.render_element_container(cx))
.when(self.show_scrollbar, |this| {
let base_scrollbar_config =
Scrollbars::new(ScrollAxes::Vertical).width_sm();
let base_scrollbar_config = Scrollbars::new(ScrollAxes::Vertical);
this.map(|this| match &self.element_container {
ElementContainer::List(state) => this.custom_scrollbars(