From 236a7ef883ae89c328c531a3cb3d449bcd480248 Mon Sep 17 00:00:00 2001 From: Ibrahim Serdar Acikgoz Date: Sat, 12 Sep 2020 14:44:09 +0300 Subject: [PATCH] prompt: fix ignoring ctrl-c key --- prompt/prompt.go | 1 + 1 file changed, 1 insertion(+) diff --git a/prompt/prompt.go b/prompt/prompt.go index 286388b..d8c7e46 100644 --- a/prompt/prompt.go +++ b/prompt/prompt.go @@ -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()