Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

gpui: Always recompute layout on cache miss.

Piotr Osiewicz4408d45f7a70
diff --git a/crates/gpui/src/view.rs b/crates/gpui/src/view.rs
index 6426ac4c32f..e485aa3e575 100644
--- a/crates/gpui/src/view.rs
+++ b/crates/gpui/src/view.rs
@@ -321,10 +321,7 @@ impl Element for AnyView {
}
}
- let mut element = state
- .element
- .take()
- .unwrap_or_else(|| (self.request_layout)(self, cx).1);
+ let mut element = (self.request_layout)(self, cx).1;
element.draw(bounds.origin, bounds.size.into(), cx);
state.cache_key = Some(ViewCacheKey {