Omit Terminal Id title in case single app instance running
Hide the current index of Terminal window from it's title if only ony instance of the Terminal application is running in the system. Fixes #9530.
This commit is contained in:
@@ -1798,7 +1798,8 @@ TermWindow::_UpdateSessionTitle(int32 index)
|
||||
|
||||
// evaluate the window title pattern
|
||||
WindowTitlePlaceholderMapper windowMapper(shellInfo, activeProcessInfo,
|
||||
fTerminalRoster.ID() + 1, sessionTitle);
|
||||
fTerminalRoster.CountTerminals() > 1
|
||||
? fTerminalRoster.ID() + 1 : 0, sessionTitle);
|
||||
const BString& windowTitle = PatternEvaluator::Evaluate(fTitle.pattern,
|
||||
windowMapper);
|
||||
|
||||
|
||||
@@ -90,7 +90,8 @@ WindowTitlePlaceholderMapper::MapPlaceholder(char placeholder, int64 number,
|
||||
case 'i':
|
||||
// window index
|
||||
_string.Truncate(0);
|
||||
_string << fWindowIndex;
|
||||
if (fWindowIndex != 0)
|
||||
_string << fWindowIndex;
|
||||
return true;
|
||||
|
||||
case 't':
|
||||
|
||||
Reference in New Issue
Block a user