Use full width of terminal (extra 2 characters)

Make output 2 characters wider to use the full width of terminal
This commit is contained in:
andy.boot
2020-08-18 22:29:44 +01:00
parent 109df305a3
commit 82237c6bde
3 changed files with 36 additions and 34 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ fn get_width_of_terminal() -> u16 {
// Mac test runners create tmp files with very long names, hence it may be shortened in the output
fn get_file_name(name: String) -> String {
let terminal_plus_buffer = (get_width_of_terminal() - 16) as usize;
let terminal_plus_buffer = (get_width_of_terminal() - 14) as usize;
if UnicodeWidthStr::width(&*name) > terminal_plus_buffer {
let trimmed_name = name
.chars()