Add autosave option

This commit is contained in:
Zachary Yedidia
2019-08-04 14:22:24 -07:00
parent bc6dd990e5
commit c0293b5d0e
9 changed files with 73 additions and 29 deletions

View File

@@ -404,6 +404,12 @@ func SetGlobalOptionNative(option string, nativeValue interface{}) error {
} else {
screen.Screen.EnableMouse()
}
} else if option == "autosave" {
if nativeValue.(float64) > 0 {
config.StartAutoSave()
} else {
config.StopAutoSave()
}
} else {
for _, pl := range config.Plugins {
if option == pl.Name {