mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 11:09:17 -07:00
Clean up and normalize examples
This commit is contained in:
@@ -87,8 +87,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
|
||||
switch msg := msg.(type) {
|
||||
case tea.KeyMsg:
|
||||
// Ctrl+c exits
|
||||
if k := msg.String(); k == "ctrl+c" || k == "q" {
|
||||
if k := msg.String(); k == "ctrl+c" || k == "q" || k == "esc" {
|
||||
return m, tea.Quit
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user