summaryrefslogtreecommitdiffstats
path: root/src/paint.rs
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-07-09 22:37:37 -0400
committerDan Davison <dandavison7@gmail.com>2020-07-09 22:39:26 -0400
commiteec60a74f3b602a3f31bdf12754e1fc4f4ea0774 (patch)
tree781f63fac77f68ecc05510ca233d05dc291e6438 /src/paint.rs
parentd9078b849145ab328ffb2e85fc1bd2bf8a03e563 (diff)
Silent bug fix: push empty line marker to line, not output buffer
Diffstat (limited to 'src/paint.rs')
-rw-r--r--src/paint.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/paint.rs b/src/paint.rs
index 09f3c8b4..55f3796b 100644
--- a/src/paint.rs
+++ b/src/paint.rs
@@ -251,7 +251,7 @@ impl<'a> Painter<'a> {
if should_right_fill_background_color {
Painter::right_fill_background_color(&mut line, fill_style);
} else if line_is_empty {
- Painter::mark_empty_line(empty_line_style, output_buffer);
+ Painter::mark_empty_line(empty_line_style, &mut line);
};
output_buffer.push_str(&line);
output_buffer.push_str("\n");
@@ -293,9 +293,9 @@ impl<'a> Painter<'a> {
}
/// Use ANSI sequences to visually mark the current line as empty.
- fn mark_empty_line(empty_line_style: Option<Style>, output_buffer: &mut String) {
+ fn mark_empty_line(empty_line_style: Option<Style>, line: &mut String) {
if let Some(empty_line_style) = empty_line_style {
- output_buffer.push_str(
+ line.push_str(
&empty_line_style
.ansi_term_style
.paint(ANSI_CSI_CLEAR_TO_BOL)