Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Restore horizontal scrollbar checks (#19767)
Kirill Bulatov2e32f1c8a195
diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rsindex 50c9d2d1269..355e8780cc9 100644--- a/crates/project_panel/src/project_panel.rs+++ b/crates/project_panel/src/project_panel.rs@@ -2821,6 +2821,17 @@ impl ProjectPanel {return None;}+ let scroll_handle = self.scroll_handle.0.borrow();+ let longest_item_width = scroll_handle+ .last_item_size+ .filter(|size| size.contents.width > size.item.width)?+ .contents+ .width+ .0 as f64;+ if longest_item_width < scroll_handle.base_handle.bounds().size.width.0 as f64 {+ return None;+ }+Some(div().occlude()