Add mouse option to allow disabling mouse support

This commit is contained in:
Zachary Yedidia
2017-09-06 15:50:50 -04:00
parent 404e5d206d
commit 90977fb4e1
5 changed files with 21 additions and 2 deletions

View File

@@ -222,6 +222,7 @@ func DefaultGlobalSettings() map[string]interface{} {
"pluginrepos": []string{},
"useprimary": true,
"fileformat": "unix",
"mouse": true,
}
}
@@ -254,6 +255,7 @@ func DefaultLocalSettings() map[string]interface{} {
"tabstospaces": false,
"useprimary": true,
"fileformat": "unix",
"mouse": true,
}
}
@@ -380,6 +382,14 @@ func SetLocalOption(option, value string, view *View) error {
}
}
if option == "mouse" {
if !nativeValue.(bool) {
screen.DisableMouse()
} else {
screen.EnableMouse()
}
}
return nil
}