Created
April 29, 2020 16:14
-
-
Save LemonBoy/8eb8cf799dfcf6373692f0e824b1e91c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/std/progress.zig b/lib/std/progress.zig | |
index bde67f1a2..e07f275b3 100644 | |
--- a/lib/std/progress.zig | |
+++ b/lib/std/progress.zig | |
@@ -138,7 +138,7 @@ pub const Progress = struct { | |
// restore the cursor position by moving the cursor | |
// `columns_written` cells to the left, then clear the rest of the | |
// line | |
- if (std.builtin.os.tag != .windows) { | |
+ if (file.supportsAnsiEscapeCodes()) { | |
end += (std.fmt.bufPrint(self.output_buffer[end..], "\x1b[{}D", .{self.columns_written}) catch unreachable).len; | |
end += (std.fmt.bufPrint(self.output_buffer[end..], "\x1b[0K", .{}) catch unreachable).len; | |
} else { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment