diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-05-31 21:40:46 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-05-31 22:19:51 -0400 |
commit | d76dba82a7d33ded533813d17d5b5b4e581a27b6 (patch) | |
tree | 9211570f11fe1ade91f38a1453067e0fa500980e /src/delta.rs | |
parent | 385214f14e94d85197dcdfbd52199f02367f8946 (diff) |
Make decorations respect --width
Fixes #61
Fixes #155
Diffstat (limited to 'src/delta.rs')
-rw-r--r-- | src/delta.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/delta.rs b/src/delta.rs index 34d66d54..1554cb9a 100644 --- a/src/delta.rs +++ b/src/delta.rs @@ -226,7 +226,7 @@ fn handle_commit_meta_header_line( painter.writer, &format!("{}{}", line, if pad { " " } else { "" }), &format!("{}{}", raw_line, if pad { " " } else { "" }), - config.terminal_width, + config.decorations_width, config.commit_style, decoration_ansi_term_style, )?; @@ -286,7 +286,7 @@ fn handle_generic_file_meta_header_line( painter.writer, &format!("{}{}", line, if pad { " " } else { "" }), &format!("{}{}", raw_line, if pad { " " } else { "" }), - config.terminal_width, + config.decorations_width, config.file_style, decoration_ansi_term_style, )?; @@ -332,7 +332,7 @@ fn handle_hunk_header_line( painter.writer, &format!("{} ", line), &format!("{} ", raw_line), - config.terminal_width, + config.decorations_width, config.hunk_header_style, decoration_ansi_term_style, )?; @@ -365,7 +365,7 @@ fn handle_hunk_header_line( painter.writer, &painter.output_buffer, &painter.output_buffer, - config.terminal_width, + config.decorations_width, config.hunk_header_style, decoration_ansi_term_style, )?; |