preview tabs: Fix tab selection getting out of sync (#10478)
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
This commit is contained in:
parent
04e89c4c51
commit
7b01a29f5a
1 changed files with 3 additions and 4 deletions
|
@ -818,11 +818,10 @@ impl Pane {
|
||||||
if let Some(prev_item) = self.items.get(prev_active_item_ix) {
|
if let Some(prev_item) = self.items.get(prev_active_item_ix) {
|
||||||
prev_item.deactivated(cx);
|
prev_item.deactivated(cx);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
cx.emit(Event::ActivateItem {
|
cx.emit(Event::ActivateItem {
|
||||||
local: activate_pane,
|
local: activate_pane,
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
if let Some(newly_active_item) = self.items.get(index) {
|
if let Some(newly_active_item) = self.items.get(index) {
|
||||||
self.activation_history
|
self.activation_history
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue