From 5d52902b4ab6a03e0b1570865c5c00a72a36e5f7 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 10 Jan 2022 08:31:10 -0700 Subject: [PATCH] invalidate fancy title bar before we potentially error out This feels slightly more robust in the face of errors refs: https://github.com/wez/wezterm/issues/1527 --- wezterm-gui/src/termwindow/render.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wezterm-gui/src/termwindow/render.rs b/wezterm-gui/src/termwindow/render.rs index 2705f3349..4fe5599d6 100644 --- a/wezterm-gui/src/termwindow/render.rs +++ b/wezterm-gui/src/termwindow/render.rs @@ -222,6 +222,8 @@ impl super::TermWindow { if let Some(need_quads) = self.render_state.as_mut().unwrap().vb[vb_idx].need_more_quads() { + self.invalidate_fancy_tab_bar(); + // Round up to next multiple of 1024 that is >= // the number of needed quads for this frame let num_quads = (need_quads + 1023) & !1023; @@ -241,7 +243,6 @@ impl super::TermWindow { } log::trace!("Allocated {} quads (needed {})", num_quads, need_quads); allocated = true; - self.invalidate_fancy_tab_bar(); } } if !allocated {