From 1ef95b917a3f051000fc08b87891452ab4c113c2 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 25 Jan 2020 12:59:28 -0800 Subject: [PATCH] do a better job at tearing down termwiztermtabs This avoids lingering on shutdown after showing one of these windows. --- src/mux/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mux/mod.rs b/src/mux/mod.rs index d56599ee0..97f93a883 100644 --- a/src/mux/mod.rs +++ b/src/mux/mod.rs @@ -254,7 +254,11 @@ impl Mux { pub fn kill_window(&self, window_id: WindowId) { let mut windows = self.windows.borrow_mut(); - windows.remove(&window_id); + if let Some(window) = windows.remove(&window_id) { + for tab in window.iter() { + self.tabs.borrow_mut().remove(&tab.tab_id()); + } + } } pub fn get_window(&self, window_id: WindowId) -> Option> {