From 1f1070fdc82eebbf4ab8da401a260d2cc66f0212 Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Fri, 6 Dec 2024 14:54:21 +0100 Subject: [PATCH] fix(screen): off by 1 error when focusing layout tab (#3844) --- zellij-server/src/screen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs index 9bbc87b2..84cc9554 100644 --- a/zellij-server/src/screen.rs +++ b/zellij-server/src/screen.rs @@ -3485,7 +3485,7 @@ pub(crate) fn screen_thread_main( pending_tab_ids.remove(&tab_index); if pending_tab_ids.is_empty() { 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 { screen.go_to_tab(tab_index as usize + 1, client_id)?;