summaryrefslogtreecommitdiffstats
path: root/src/core.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2021-03-07 11:30:26 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2021-03-07 11:30:26 +0900
commite2e8d94b147c164c9c0bf8c2b70e84eb3395657c (patch)
treeb9d626d486d590e108b25a7d4ba9a4699c1bd94b /src/core.go
parent4f9a7f8c879ef625f3bec5946df9e7fe5768f9dd (diff)
Kill input command on terminate
Fix #2381 Close #2382
Diffstat (limited to 'src/core.go')
-rw-r--r--src/core.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core.go b/src/core.go
index a18c3a18..d9a83bd4 100644
--- a/src/core.go
+++ b/src/core.go
@@ -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)