aboutsummaryrefslogtreecommitdiff
path: root/src/app/input
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-14 05:30:20 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-14 05:30:20 +0300
commit226e87306deaba017d36583f51ae34e42b303aad (patch)
tree2a1155689b75007c15d93735aedfa58db7a05edf /src/app/input
parent17544c36ee397233e2f7b3319d86e3b517e3b5d0 (diff)
fix: preserve tab identity across restored sessions
Diffstat (limited to 'src/app/input')
-rw-r--r--src/app/input/modal.rs10
1 files changed, 9 insertions, 1 deletions
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();
}