diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-06-18 12:46:00 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-06-18 12:47:20 -0400 |
commit | f0e6c833b37bbd015074da1a3707de2991b3052c (patch) | |
tree | 384be3b84fd02d509bbc7fc704dcef5b669fe3f3 /src/paint.rs | |
parent | fbef92d8771b9cea2cf79fc4ddca0f2ac5de237b (diff) |
Do not emit unnecessary ANSI sequence
https://github.com/dandavison/delta/pull/225#discussion_r442234332
Diffstat (limited to 'src/paint.rs')
-rw-r--r-- | src/paint.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/paint.rs b/src/paint.rs index f946853c..05bc714b 100644 --- a/src/paint.rs +++ b/src/paint.rs @@ -15,7 +15,6 @@ use crate::style::Style; pub const ANSI_CSI_CLEAR_TO_EOL: &str = "\x1b[0K"; pub const ANSI_CSI_CLEAR_TO_BOL: &str = "\x1b[1K"; -pub const ANSI_CSI_CURSOR_BACK_1: &str = "\x1b[1D"; pub const ANSI_SGR_RESET: &str = "\x1b[0m"; pub struct Painter<'a> { @@ -240,10 +239,7 @@ impl<'a> Painter<'a> { output_buffer.push_str( &empty_line_style .ansi_term_style - .paint(format!( - "{}{}", - ANSI_CSI_CLEAR_TO_BOL, ANSI_CSI_CURSOR_BACK_1 - )) + .paint(ANSI_CSI_CLEAR_TO_BOL) .to_string(), ); } |