From 226e87306deaba017d36583f51ae34e42b303aad Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sun, 14 Jun 2026 05:30:20 +0300 Subject: fix: preserve tab identity across restored sessions --- src/app/input/modal.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/app/input') diff --git a/src/app/input/modal.rs b/src/app/input/modal.rs index 3d106765..cff760bf 100644 --- a/src/app/input/modal.rs +++ b/src/app/input/modal.rs @@ -458,7 +458,15 @@ pub(super) fn apply_rename_action(state: &mut AppState, action: ModalAction) { tab.is_auto_named() && new_name == tab.number.to_string(); if !new_name.is_empty() && !keep_auto_name { tab.set_custom_name(new_name); - let tab_id = format!("{}:{}", workspace_id, active_tab + 1); + let tab_id = ws + .public_tab_number(active_tab) + .map(|number| { + crate::workspace::public_tab_id_for_number( + &workspace_id, + number, + ) + }) + .unwrap_or_else(|| workspace_id.clone()); crate::logging::tab_renamed(&workspace_id, &tab_id); state.mark_session_dirty(); } -- cgit v1.2.3