From c1b4f3d8176707af89940fd355d100a9e3a973c8 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Thu, 14 Mar 2024 09:34:20 +0100 Subject: [PATCH] Fix accidental leak of text stack between frames (cherry-pick #9297) (#9324) Cherry-picked Fix accidental leak of text stack between frames (#9297) Co-Authored-By: Max Co-Authored-By: Marshall Release Notes: - Fixed a bug where text styles could leak between frames (preview only) Co-authored-by: Max Co-authored-by: Marshall Co-authored-by: Conrad Irwin Co-authored-by: Max Co-authored-by: Marshall --- crates/gpui/src/window/element_cx.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/gpui/src/window/element_cx.rs b/crates/gpui/src/window/element_cx.rs index 37530ff059b79cd9123fa8d6a1c5a54b0978b32f..c62ab96feab6ed491af029b756b8f9056af28ade 100644 --- a/crates/gpui/src/window/element_cx.rs +++ b/crates/gpui/src/window/element_cx.rs @@ -432,6 +432,7 @@ impl<'a> ElementContext<'a> { ); self.window.next_frame.deferred_draws = deferred_draws; self.window.element_id_stack.clear(); + self.window.text_style_stack.clear(); } fn paint_deferred_draws(&mut self, deferred_draw_indices: &[usize]) {