From 91ecac800387956b225156e46cbc411a2d08152e Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 14 Sep 2025 13:52:00 +0200 Subject: [PATCH] termstatus: fix crash when printing empty string --- internal/ui/termstatus/status.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ui/termstatus/status.go b/internal/ui/termstatus/status.go index 71be8ec4e..c9cab9136 100644 --- a/internal/ui/termstatus/status.go +++ b/internal/ui/termstatus/status.go @@ -237,7 +237,7 @@ func (t *Terminal) runWithoutStatus(ctx context.Context) { func (t *Terminal) print(line string, isErr bool) { // make sure the line ends with a line break - if line[len(line)-1] != '\n' { + if len(line) == 0 || line[len(line)-1] != '\n' { line += "\n" }