feat: fix ctrl-c exit
This commit is contained in:
parent
e06764a689
commit
e3bd7bee54
2
main.go
2
main.go
@ -45,7 +45,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||||||
switch msg := msg.(type) {
|
switch msg := msg.(type) {
|
||||||
case tea.KeyMsg:
|
case tea.KeyMsg:
|
||||||
switch msg.Type {
|
switch msg.Type {
|
||||||
case tea.KeyEnter, tea.KeyCtrlC, tea.KeyEsc:
|
case tea.KeyEsc:
|
||||||
return m, tea.Quit
|
return m, tea.Quit
|
||||||
}
|
}
|
||||||
case tickMsg:
|
case tickMsg:
|
||||||
|
Loading…
Reference in New Issue
Block a user