Guarantee preview/previewClear ordering (#537)

* Use chan struct{} in place of chan bool

* Revert "nav.checkReg now returns a boolean instead of calling nav.preview"

* Guarantee preview/previewClear ordering

* Pass the file path to the cleaner script
This commit is contained in:
neeshy authored and GitHub committed 2020-12-27 04:23:03 +03:00
1 parent 72567c9237
commit 1e94f4533e
9 files changed
+48 -41

No files matched your search

+2 -2
View File
@@ -699,7 +699,7 @@ func (e *callExpr) eval(app *app, args []string) {
log.Printf("writing selection file: %s", err)
}
app.quitChan <- true
app.quitChan <- struct{}{}
return
}
@@ -708,7 +708,7 @@ func (e *callExpr) eval(app *app, args []string) {
cmd.eval(app, e.args)
}
case "quit":
app.quitChan <- true
app.quitChan <- struct{}{}
case "top":
app.nav.top()
app.ui.loadFile(app.nav)