Enable focus reporting only for hidecursorinactive (#1676)

This commit is contained in:
Joe Lim authored and GitHub committed 2024-04-07 15:17:23 +02:00
1 parent d26eb0108a
commit 6e6682fc1f
2 files changed
+7 -1

No files matched your search

-1
View File
@@ -36,7 +36,6 @@ func run() {
if gOpts.mouse {
screen.EnableMouse()
}
screen.EnableFocus()
if gLogPath != "" {
f, err := os.OpenFile(gLogPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
+7
View File
@@ -114,6 +114,13 @@ func (e *setExpr) eval(app *app, args []string) {
}
case "hidecursorinactive", "nohidecursorinactive", "hidecursorinactive!":
err = applyBoolOpt(&gOpts.hidecursorinactive, e)
if err == nil {
if gOpts.hidecursorinactive {
app.ui.screen.EnableFocus()
} else {
app.ui.screen.DisableFocus()
}
}
case "history", "nohistory", "history!":
err = applyBoolOpt(&gOpts.history, e)
case "icons", "noicons", "icons!":