From 4e6f398d6326729320f21aeef2e5f5d4a280aae0 Mon Sep 17 00:00:00 2001 From: Kattouf Date: Sun, 7 Jul 2024 23:23:52 +0700 Subject: [PATCH] fix wasWritten logic --- Sources/Printer.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Printer.swift b/Sources/Printer.swift index 39bf5c2..13a1fe1 100644 --- a/Sources/Printer.swift +++ b/Sources/Printer.swift @@ -54,7 +54,7 @@ final class Printer: Sendable { $0.write(buffer.value.data(using: .utf8)!) try? $0.synchronize() } - if !_wasWritten.value && !buffer.value.withoutANSI().isEmpty { + if !_wasWritten.value { _wasWritten.setValue(true) } buffer.setValue(String())