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.

Fix window refreshing

Antonio Scandurra4900e04ff321
diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs
index b680024ab15..c1fe8f841df 100644
--- a/crates/gpui/src/app.rs
+++ b/crates/gpui/src/app.rs
@@ -1985,6 +1985,9 @@ impl AppContext {
for window_id in window_ids {
self.update_window(window_id, |cx| {
let mut invalidation = cx.window.invalidation.take().unwrap_or_default();
+ invalidation
+ .updated
+ .extend(cx.window.rendered_views.keys().copied());
cx.invalidate(&mut invalidation, cx.window.platform_window.appearance());
cx.refreshing = true;
let scene = cx.build_scene();
diff --git a/crates/gpui/src/app/window.rs b/crates/gpui/src/app/window.rs
index 4ae0e9326ac..7ca1f32c10c 100644
--- a/crates/gpui/src/app/window.rs
+++ b/crates/gpui/src/app/window.rs
@@ -738,6 +738,9 @@ impl<'a: 'b, 'b> WindowContext<'a, 'b> {
RectF::from_points(Vector2F::zero(), window_size),
self,
);
+ self.window
+ .rendered_views
+ .insert(root_view_id, rendered_root);
self.window.text_layout_cache.finish_frame();
let scene = scene_builder.build();