config: Rework autosave to be rearmed upon change

This commit is contained in:
Jöran Karl
2024-06-24 19:12:47 +02:00
parent 4170df89eb
commit 8b31dc79bf
3 changed files with 28 additions and 17 deletions

View File

@@ -356,9 +356,9 @@ func main() {
log.Println(clipErr, " or change 'clipboard' option")
}
config.StartAutoSave()
if a := config.GetGlobalOption("autosave").(float64); a > 0 {
config.SetAutoTime(a)
config.StartAutoSave()
}
screen.Events = make(chan tcell.Event)