diff --git a/client.go b/client.go index db60df4e..559102d2 100644 --- a/client.go +++ b/client.go @@ -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) diff --git a/eval.go b/eval.go index bdb7ff88..be3b1c2a 100644 --- a/eval.go +++ b/eval.go @@ -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!":