Skip to content

Commit

Permalink
Merge pull request #167 from dandavison/fixup-165-ansi-erase-in-line
Browse files Browse the repository at this point in the history
Fixup #165 ANSI Erase in Line
  • Loading branch information
dandavison authored Apr 30, 2020
2 parents 692fb19 + 5b26209 commit 703c6a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/paint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ impl<'a> Painter<'a> {
}
ansi_strings.push(to_ansi_style(style, config.true_color).paint(text));
}
ansi_strings.push(background_ansi_style.paint(""));
let line = &mut ansi_term::ANSIStrings(&ansi_strings).to_string();
let background_color_extends_to_terminal_width =
match background_color_extends_to_terminal_width {
Expand All @@ -145,6 +146,7 @@ impl<'a> Painter<'a> {
}
output_buffer.push_str(&line);
output_buffer.push_str(ANSI_CSI_ERASE_IN_LINE);
output_buffer.push_str(ANSI_SGR_RESET);
} else {
output_buffer.push_str(&line);
}
Expand Down

0 comments on commit 703c6a7

Please sign in to comment.