tab_switcher: Fix missing preview on initial ctrl-shift-tab press (#44959)

Closes #44852

Release Notes:

- Fixed tab preview not showing up on initial ctrl-shift-tab press
This commit is contained in:
Mayank Verma 2025-12-16 13:56:29 +05:30 committed by GitHub
parent 65e9001791
commit 81d8fb930a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -529,7 +529,9 @@ impl TabSwitcherDelegate {
}
if self.select_last {
return self.matches.len() - 1;
let item_index = self.matches.len() - 1;
self.set_selected_index(item_index, window, cx);
return item_index;
}
// This only runs when initially opening the picker