diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-05 19:55:39 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-10 00:23:01 +1100 |
commit | a482f20ba37d97cfaa6a48be57abfd2faf768448 (patch) | |
tree | a39500f1fb1b8a15184db9871eaf5b14c74e78cf | |
parent | c36349f460cc03621cb6b772732990a690ed45d6 (diff) |
kill process if nothing happens two seconds after final event
-rw-r--r-- | pkg/gui/recording.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/gui/recording.go b/pkg/gui/recording.go index 57bf27948..12b1fc3fd 100644 --- a/pkg/gui/recording.go +++ b/pkg/gui/recording.go @@ -6,6 +6,8 @@ import ( "log" "os" "time" + + "github.com/jesseduffield/gocui" ) 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) { |