github.com/mutagen-io/mutagen@v0.18.0-rc1/cmd/output_windows.go (about) 1 package cmd 2 3 const ( 4 // statusLineFormat is the format string to use for status line printing. On 5 // Windows systems, we truncate and pad messages (with spaces) so that the 6 // printed content is exactly 79 characters. This ensures that (a) all 7 // content from the previous line is overwritten, (b) the cursor is not 8 // flashing back and forth to different positions at the end of the printed 9 // content, and (c) that the content doesn't overflow the terminal. Of 10 // course, the last condition is contingent on the terminal being at least 11 // 80 characters wide, and newlines will occur if that's not the case, but 12 // 80 characters is the default width of the console on most versions of 13 // Windows, and modern versions are even wider. The reason we have to limit 14 // ourselves to 79 characters of content instead of 80 is that carriage 15 // return wipes don't work if the cursor has already printed a character in 16 // the last position of the line on Windows. 17 statusLineFormat = "\r%-79.79s" 18 // statusLineClearFormat is the format string to use for printing an empty 19 // string to clear the status line. It adds a carriage return to return the 20 // cursor to the beginning of the line. 21 statusLineClearFormat = statusLineFormat + "\r" 22 )