Skip to content

Commit 2b954b1

Browse files
committed
fix(analyze): ESC quits at top level, update hint text
- goBack() now calls tea.Quit when already at overview root with no history, so ESC exits consistently from any depth - hint text at the top level updated from "Ctrl+C Quit" to "Esc/Q Quit" to reflect actual key bindings
1 parent 5f3975f commit 2b954b1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

β€Žcmd/analyze/main.goβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ func (m model) goBack() (tea.Model, tea.Cmd) {
923923
if !m.inOverviewMode() {
924924
return m, m.switchToOverviewMode()
925925
}
926-
return m, nil
926+
return m, tea.Quit
927927
}
928928

929929
last := m.history[len(m.history)-1]

β€Žcmd/analyze/view.goβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ func (m model) View() string {
329329
if len(m.history) > 0 {
330330
fmt.Fprintf(&b, "%s↑↓←→ | Enter | R Refresh | O Open | F File | Esc Back | Q/Ctrl+C Quit%s\n", colorGray, colorReset)
331331
} else {
332-
fmt.Fprintf(&b, "%s↑↓→ | Enter | R Refresh | O Open | F File | Ctrl+C Quit%s\n", colorGray, colorReset)
332+
fmt.Fprintf(&b, "%s↑↓→ | Enter | R Refresh | O Open | F File | Esc/Q Quit%s\n", colorGray, colorReset)
333333
}
334334
} else if m.showLargeFiles {
335335
selectCount := len(m.largeMultiSelected)

0 commit comments

Comments
Β (0)