Skip to content

Commit

Permalink
prompt: fix ignoring ctrl-c key
Browse files Browse the repository at this point in the history
  • Loading branch information
isacikgoz committed Sep 12, 2020
1 parent f7cf553 commit 236a7ef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions prompt/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ func (p *Prompt) mainloop() error {

switch r := ev.ch; r {
case rune(term.KeyCtrlC), rune(term.KeyCtrlD):
p.Stop()
return nil
case term.Enter, term.NewLine:
items, idx := p.list.Items()
Expand Down

0 comments on commit 236a7ef

Please sign in to comment.