Bug 440878

Summary: Tabbar title format with session number behaves weird
Product: [Applications] konsole Reporter: olcay seker <oseker>
Component: tabbarAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 21.04.3   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Tab title session number ss

Description olcay seker 2021-08-11 20:53:31 UTC
Created attachment 140658 [details]
Tab title session number ss

My daily workflow requires to interact with many servers for configuration and management. For that, i am using custom tab/remote tab title format and i add session number place holder for new tabs to interact easly with alt+<number> shortcut.
What annoys me is, if i close a tab and open new one after that, tab number gets incremented number, not last closed one which confuses me for keyboard shortcut. For instance; i have 3 tabs open and their tab titles are 1,2,3. if i close tab number three and open new one, tab titles become 1,2,4. At the end of the day my tab titles appearence is 1,3,8,11 etc which is annoying. 

To reproduce, edit your profile -> tabs -> Tab Titles. Insert session number place holder for your tab titles. Then open and close tabs. You will see numbers become weird and hard to navigate with shortcut.
In short, new tab sesion number must continue where it leaved off.
Comment 1 Bug Janitor Service 2023-11-17 10:34:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/925
Comment 2 tcanabrava 2023-11-24 15:02:26 UTC
Git commit f7d0c2ae7dbef995fe8ab3c90dc361a55a3e9463 by Tomaz  Canabrava, on behalf of Ilya Pominov.
Committed on 24/11/2023 at 16:00.
Pushed by tcanabrava into branch 'master'.

Change session Id numbering

Assign the new session Id equal to the maximum existing Id + 1.

The session Id may be displayed in the tab title. If we open 2 tabs and
then close the second one, then the next opened tab will get number 3
instead of number 2, which can be confusing for the user.

M  +9    -2    src/session/Session.cpp
M  +0    -1    src/session/Session.h

https://invent.kde.org/utilities/konsole/-/commit/f7d0c2ae7dbef995fe8ab3c90dc361a55a3e9463