1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-05-31 23:19:40 +02:00

kill process if nothing happens two seconds after final event

This commit is contained in:
Jesse Duffield 2020-10-05 19:55:39 +11:00
parent c36349f460
commit a482f20ba3

View File

@ -6,6 +6,8 @@ import (
"log" "log"
"os" "os"
"time" "time"
"github.com/jesseduffield/gocui"
) )
func recordingEvents() bool { func recordingEvents() bool {
@ -47,6 +49,16 @@ func (gui *Gui) replayRecordedEvents() {
} }
} }
} }
time.Sleep(time.Second * 1)
gui.g.Update(func(*gocui.Gui) error {
return gocui.ErrQuit
})
time.Sleep(time.Second * 1)
log.Fatal("lazygit should have already exited")
} }
func (gui *Gui) loadRecordedEvents() ([]RecordedEvent, error) { func (gui *Gui) loadRecordedEvents() ([]RecordedEvent, error) {