From 7b01a29f5aa7ed55c839be23d5378a841a14884e Mon Sep 17 00:00:00 2001 From: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com> Date: Fri, 12 Apr 2024 17:20:30 +0200 Subject: [PATCH] preview tabs: Fix tab selection getting out of sync (#10478) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There was an edge case where the project panel selection would not be updated when opening a lot of tabs quickly using the preview tab feature. I spent way too long debugging this, thankfully @ConradIrwin spotted it in like 5 minutes 🎉 Release Notes: - N/A --- crates/workspace/src/pane.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 449dae95d79435e4f70083881986ee66f9e2e89c..6bfd16e528fb68b657198092ed54cba11769f0fe 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -818,11 +818,10 @@ impl Pane { if let Some(prev_item) = self.items.get(prev_active_item_ix) { prev_item.deactivated(cx); } - - cx.emit(Event::ActivateItem { - local: activate_pane, - }); } + cx.emit(Event::ActivateItem { + local: activate_pane, + }); if let Some(newly_active_item) = self.items.get(index) { self.activation_history