| ... | ... | @@ -1133,8 +1133,10 @@ fn computePrefix( |
| 1133 | 1133 | return i; |
| 1134 | 1134 | } |
| 1135 | 1135 | |
| 1136 | // \r\n on Windows, \n otherwise. |
| 1137 | const nl_len = if (is_windows) 2 else 1; |
| 1136 | 1138 | const line_upper_bound_len = @max(TreeSymbol.tee.maxByteLen(), TreeSymbol.langle.maxByteLen()) + |
| 1137 | | "[4294967296/4294967296] ".len + Node.max_name_len + (1 + up_one_line.len) + finish_sync.len; |
| 1139 | "[4294967296/4294967296] ".len + Node.max_name_len + nl_len + (1 + up_one_line.len) + finish_sync.len; |
| 1138 | 1140 | |
| 1139 | 1141 | fn computeNode( |
| 1140 | 1142 | buf: []u8, |
| ... | ... | @@ -1183,6 +1185,13 @@ fn computeNode( |
| 1183 | 1185 | } |
| 1184 | 1186 | |
| 1185 | 1187 | i = @min(global_progress.cols + start_i, i); |
| 1188 | if (is_windows) { |
| 1189 | // \r\n on Windows is necessary for the old console with the |
| 1190 | // ENABLE_VIRTUAL_TERMINAL_PROCESSING | DISABLE_NEWLINE_AUTO_RETURN |
| 1191 | // console modes set to behave properly. |
| 1192 | buf[i] = '\r'; |
| 1193 | i += 1; |
| 1194 | } |
| 1186 | 1195 | buf[i] = '\n'; |
| 1187 | 1196 | i += 1; |
| 1188 | 1197 | nl_n += 1; |