mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
Fix minor autosave race condition
This commit is contained in:
@@ -406,9 +406,10 @@ func SetGlobalOptionNative(option string, nativeValue interface{}) error {
|
||||
}
|
||||
} else if option == "autosave" {
|
||||
if nativeValue.(float64) > 0 {
|
||||
config.SetAutoTime(int(nativeValue.(float64)))
|
||||
config.StartAutoSave()
|
||||
} else {
|
||||
config.StopAutoSave()
|
||||
config.SetAutoTime(0)
|
||||
}
|
||||
} else {
|
||||
for _, pl := range config.Plugins {
|
||||
|
||||
Reference in New Issue
Block a user