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

@@ -233,6 +233,10 @@ func main() {
case f := <-shell.Jobs:
// If a new job has finished while running in the background we should execute the callback
f.Function(f.Output, f.Args...)
case <-config.Autosave:
for _, b := range buffer.OpenBuffers {
b.Save()
}
case event = <-events:
case <-screen.DrawChan:
}