mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 11:09:17 -07:00
Also use escape to quit
This commit is contained in:
@@ -36,6 +36,8 @@ func update(msg tea.Msg, model tea.Model) (tea.Model, tea.Cmd) {
|
||||
}
|
||||
|
||||
case "q":
|
||||
fallthrough
|
||||
case "esc":
|
||||
return m, tea.Quit
|
||||
|
||||
}
|
||||
@@ -56,7 +58,7 @@ func view(model tea.Model) string {
|
||||
)
|
||||
|
||||
return fmt.Sprintf(
|
||||
"What to do today?\n\n%s\n\n(press j/k or up/down to select, q to quit)",
|
||||
"What to do today?\n\n%s\n\n(press j/k or up/down to select, q or esc to quit)",
|
||||
choices,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user