1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-04 03:48:07 +02:00

fix loop logic

This commit is contained in:
Jesse Duffield 2020-10-05 20:43:07 +11:00
parent 3f5e52f774
commit 08f8472db3

View File

@ -41,13 +41,14 @@ func (gui *Gui) replayRecordedEvents() {
var speed int64 = 5
for _, event := range events {
middle:
for {
select {
case <-ticker.C:
now := gui.timeSinceStart()*speed - leeway
if gui.g != nil && now >= event.Timestamp {
gui.g.ReplayedEvents <- *event.Event
break
break middle
}
case <-gui.stopChan:
return