Kill input command on terminate

Fix #2381
Close #2382
This commit is contained in:
Junegunn Choi committed 2021-03-07 11:30:26 +09:00
1 parent 4f9a7f8c87
commit e2e8d94b14
3 files changed
+24 -16

No files matched your search

+5 -1
View File
@@ -254,7 +254,11 @@ func Run(opts *Options, version string, revision string) {
}
for evt, value := range *events {
switch evt {
case EvtQuit:
if reading {
reader.terminate()
}
os.Exit(value.(int))
case EvtReadNew, EvtReadFin:
if evt == EvtReadFin && nextCommand != nil {
restart(*nextCommand)