From 630ea7d32437e41d20c7f3abcc698abaed3d27ec Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 26 May 2024 13:02:54 +1000 Subject: [PATCH] Fix issue where logs were buggy after returning from subprocess Turns out that upon switching to a subprocess we were cancelling ALL periodic tasks, which includes re-rendering the main view ever 30ms. This completely broke our log rendering and meant that it only updated when an event occurred --- pkg/gui/gui.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 281dd459..bf00fdd7 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -176,11 +176,9 @@ func (gui *Gui) goEvery(interval time.Duration, function func() error) { ticker := time.NewTicker(interval) defer ticker.Stop() for range ticker.C { - if gui.PauseBackgroundThreads { - return + if !gui.PauseBackgroundThreads { + _ = function() } - - _ = function() } }() }