Skip to content

Commit 3de0148

Browse files
authored
Merge pull request #2387 from dgageot/board/fix-docker-agent-issue-2373-857ba335
fix: /exit closes only the current tab when multiple tabs are open
2 parents 7c6204b + ef1b18a commit 3de0148

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
@@ -836,6 +836,11 @@ func (m *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
836836
// --- Exit ---
837837

838838
case messages.ExitSessionMsg:
839+
// If multiple tabs are open, close only the current tab instead of
840+
// quitting the entire application (see #2373).
841+
if m.supervisor != nil && m.supervisor.Count() > 1 {
842+
return m.handleCloseTab(m.supervisor.ActiveID())
843+
}
839844
m.cleanupAll()
840845
return m, tea.Quit
841846

0 commit comments

Comments
 (0)