Skip to content

Commit

Permalink
Remove the extra space, and make the wide element fill the whole term…
Browse files Browse the repository at this point in the history
…inal width
  • Loading branch information
sigmaSd committed Jan 10, 2022
1 parent 98d1cee commit 954801d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions src/draw_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,6 @@ impl ProgressDrawState {
} else {
// Don't append a '\n' if this is the last line
term.write_str(line)?;
// Also append a ' ' to keep the original chars count
// This is important if the line was meant to fill the entire width
term.write_str(" ")?;
}
}
Ok(())
Expand Down
1 change: 1 addition & 0 deletions src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ impl<'a> WideElement<'a> {
buf: &mut String,
) -> String {
let left = state.width().saturating_sub(measure_text_width(&cur));
let left = left + 1; // Add 1 to cover the whole terminal width
match self {
Self::Bar { alt_style } => cur.replace(
"\x00",
Expand Down

0 comments on commit 954801d

Please sign in to comment.