add 'on-quit' command to run a command before quit

cc #770
This commit is contained in:
Gokcehan committed 2022-02-27 14:09:08 +03:00
1 parent fb66a21577
commit 25476e79ef
1 file changed
+4
+4
View File
@@ -374,6 +374,10 @@ func (app *app) loop() {
continue
}
if cmd, ok := gOpts.cmds["on-quit"]; ok {
cmd.eval(app, nil)
}
app.quit()
app.nav.previewChan <- ""