diff --git a/src/apps/terminal/TermWindow.cpp b/src/apps/terminal/TermWindow.cpp index 3703ec21ce..1e7987e888 100644 --- a/src/apps/terminal/TermWindow.cpp +++ b/src/apps/terminal/TermWindow.cpp @@ -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); diff --git a/src/apps/terminal/TitlePlaceholderMapper.cpp b/src/apps/terminal/TitlePlaceholderMapper.cpp index b5ec9b4138..9cac1b51c8 100644 --- a/src/apps/terminal/TitlePlaceholderMapper.cpp +++ b/src/apps/terminal/TitlePlaceholderMapper.cpp @@ -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':