Skip to content

Commit ef1b18a

Browse files
committed
fix: /exit closes only the current tab when multiple tabs are open
When multiple tabs are open, /exit now closes only the active tab instead of quitting the entire application. Single-tab behavior is unchanged. Fixes #2373 Assisted-By: docker-agent
1 parent 170d4d7 commit ef1b18a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkg/tui/tui.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,11 @@ func (m *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
812812
// --- Exit ---
813813

814814
case messages.ExitSessionMsg:
815+
// If multiple tabs are open, close only the current tab instead of
816+
// quitting the entire application (see #2373).
817+
if m.supervisor != nil && m.supervisor.Count() > 1 {
818+
return m.handleCloseTab(m.supervisor.ActiveID())
819+
}
815820
m.cleanupAll()
816821
return m, tea.Quit
817822

0 commit comments

Comments
 (0)