Add watch option

This commit is contained in:
Joe Lim committed 2024-03-30 19:29:15 +11:00
1 parent 1e10e95f4d
commit 7c3cfa8865
5 files changed
+45

No files matched your search

+9
View File
@@ -185,6 +185,15 @@ func (e *setExpr) eval(app *app, args []string) {
app.ui.sort()
app.ui.loadFile(app, true)
}
case "watch", "nowatch", "watch!":
err = applyBoolOpt(&gOpts.watch, e)
if err == nil {
if gOpts.watch {
app.nav.startWatcher()
} else {
app.nav.stopWatcher()
}
}
case "wrapscan", "nowrapscan", "wrapscan!":
err = applyBoolOpt(&gOpts.wrapscan, e)
case "wrapscroll", "nowrapscroll", "wrapscroll!":