]> gitweb.factorcode.org Git - factor.git/commitdiff
io.streams.ansi: fix reset
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 28 Jan 2023 00:30:18 +0000 (16:30 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 28 Jan 2023 00:31:58 +0000 (16:31 -0800)
extra/io/streams/ansi/ansi.factor

index 72c02278a3dd85c7f3e56373f5a811a038ca592e..f2eb66fc2bc5b431838ba4b30b4b4ca6d9ca4e70 100644 (file)
@@ -56,8 +56,8 @@ M:: ansi stream-format ( str style stream -- )
     style foreground of [ color>foreground out stream-write t ] [ f ] if*
     style background of [ color>background out stream-write t ] [ f ] if*
     style font-style of [ font-styles out stream-write t ] [ f ] if*
-    or or [ "\e[0m" out stream-write ] unless
-    str out stream-write ;
+    str out stream-write
+    or or [ "\e[0m" out stream-write ] when ;
 
 M: ansi make-span-stream
     swap <style-stream> <ignore-close-stream> ;