fix(screen): off by 1 error when focusing layout tab (#3844)

This commit is contained in:
Aram Drevekenin 2024-12-06 14:54:21 +01:00 committed by GitHub
parent fe2e6ed091
commit 1f1070fdc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3485,7 +3485,7 @@ pub(crate) fn screen_thread_main(
pending_tab_ids.remove(&tab_index); pending_tab_ids.remove(&tab_index);
if pending_tab_ids.is_empty() { if pending_tab_ids.is_empty() {
for (tab_index, client_id) in pending_tab_switches.drain() { for (tab_index, client_id) in pending_tab_switches.drain() {
screen.go_to_tab(tab_index as usize, client_id)?; screen.go_to_tab(tab_index as usize + 1, client_id)?;
} }
if should_change_focus_to_new_tab { if should_change_focus_to_new_tab {
screen.go_to_tab(tab_index as usize + 1, client_id)?; screen.go_to_tab(tab_index as usize + 1, client_id)?;