Enable focus reporting only for hidecursorinactive (#1676)
This commit is contained in:
1 parent
d26eb0108a
commit
6e6682fc1f
2 files changed
+7
-1
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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!":
|
||||
|
||||
Reference in new issue
Block a user