| ... | @@ -185,9 +185,11 @@ pub fn refresh(self: *Progress) void { | ... | @@ -185,9 +185,11 @@ pub fn refresh(self: *Progress) void { |
| 185 | // ED -- Clear screen | 185 | // ED -- Clear screen |
| 186 | const ED = "\x1b[J"; | 186 | const ED = "\x1b[J"; |
| 187 | // DECSC -- Save cursor position | 187 | // DECSC -- Save cursor position |
| 188 | const DECSC = "\x1b[s"; | 188 | const DECSC = "\x1b7"; |
| 189 | // DECRC -- Restore cursor position | 189 | // DECRC -- Restore cursor position |
| 190 | const DECRC = "\x1b[u"; | 190 | const DECRC = "\x1b8"; |
| | 191 | // Note that ESC7/ESC8 are used instead of CSI s/CSI u as the latter are not |
| | 192 | // supported by some terminals (eg. Terminal.app). |
| 191 | | 193 | |
| 192 | fn refreshWithHeldLock(self: *Progress) void { | 194 | fn refreshWithHeldLock(self: *Progress) void { |
| 193 | const is_dumb = !self.supports_ansi_escape_codes and !(std.builtin.os.tag == .windows); | 195 | const is_dumb = !self.supports_ansi_escape_codes and !(std.builtin.os.tag == .windows); |