From 0ab38faa2ec95058962f6b0ca48e67d0c0a29f1a Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 7 Sep 2025 12:19:11 +0200 Subject: [PATCH] termstatus: track current status also in background Without this, restic could temporarily print an outdated status when moving back into the foreground. --- internal/ui/termstatus/status.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/ui/termstatus/status.go b/internal/ui/termstatus/status.go index 8d6413949..1e105b65f 100644 --- a/internal/ui/termstatus/status.go +++ b/internal/ui/termstatus/status.go @@ -142,13 +142,13 @@ func (t *Terminal) run(ctx context.Context) { } case stat := <-t.status: + status = append(status[:0], stat.lines...) + if terminal.IsProcessBackground(t.fd) { // ignore all messages, do nothing, we are in the background process group continue } - status = status[:0] - status = append(status, stat.lines...) t.writeStatus(status) } }