diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-12 19:07:07 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-12 19:10:09 +0300 |
| commit | f7a7da03fc27cc6fe4e6a44dabddcd303f939bb9 (patch) | |
| tree | 69a00241e4500703bb723b64dd0060cc83730a0b /src/app/input/modal.rs | |
| parent | 53429206b736aa0fcfb1c5bfc1c0b11dcca3a059 (diff) | |
fix: stabilize public pane and tab ids
refs #569
Diffstat (limited to 'src/app/input/modal.rs')
| -rw-r--r-- | src/app/input/modal.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/app/input/modal.rs b/src/app/input/modal.rs index 79d066f9..3d106765 100644 --- a/src/app/input/modal.rs +++ b/src/app/input/modal.rs @@ -355,7 +355,7 @@ fn next_new_tab_default_name(state: &AppState) -> String { state .active .and_then(|i| state.workspaces.get(i)) - .map(|ws| (ws.tabs.len() + 1).to_string()) + .map(|ws| ws.next_public_tab_number.to_string()) .unwrap_or_else(|| "1".to_string()) } @@ -1288,7 +1288,7 @@ mod tests { } #[test] - fn closing_first_auto_tab_resets_remaining_auto_tab_and_next_prompt() { + fn closing_first_auto_tab_keeps_remaining_auto_tab_number_and_next_prompt() { let mut state = state_with_workspaces(&["test"]); open_new_tab_dialog(&mut state); handle_rename_key( @@ -1303,11 +1303,11 @@ mod tests { state.workspaces[0].close_tab(0); state.workspaces[0].switch_tab(0); - assert_eq!(state.workspaces[0].tabs[0].display_name(), "1"); + assert_eq!(state.workspaces[0].tabs[0].display_name(), "2"); assert!(state.workspaces[0].tabs[0].custom_name.is_none()); open_new_tab_dialog(&mut state); - assert_eq!(state.name_input, "2"); + assert_eq!(state.name_input, "3"); } #[test] |
