mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
Clean up and normalize examples
This commit is contained in:
@@ -50,11 +50,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
switch msg := msg.(type) {
|
||||
case tea.KeyMsg:
|
||||
switch msg.Type {
|
||||
case tea.KeyCtrlC:
|
||||
fallthrough
|
||||
case tea.KeyEsc:
|
||||
fallthrough
|
||||
case tea.KeyEnter:
|
||||
case tea.KeyEnter, tea.KeyCtrlC, tea.KeyEsc:
|
||||
return m, tea.Quit
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user