diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-12-27 21:44:00 +0000 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-12-27 22:06:37 +0000 |
commit | 8210334b44bd63a450cf66e4203910e4c2eb055b (patch) | |
tree | f0490c49995d00f06dfd199306d12b98d9c0e846 /src/config.rs | |
parent | 32e068bf6e736ff9d364b9d066adbfc62e69b944 (diff) |
Use special style attribute to control line-number in hunk-header
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index d7f99b20..7331a12c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -33,6 +33,7 @@ pub struct Config { pub git_config_entries: HashMap<String, GitConfigEntry>, pub hunk_header_style: Style, pub hunk_header_style_include_file_path: bool, + pub hunk_header_style_include_line_number: bool, pub hyperlinks: bool, pub hyperlinks_file_link_format: String, pub inspect_raw_lines: cli::InspectRawLines, @@ -167,6 +168,10 @@ impl From<cli::Opt> for Config { .hunk_header_style .split(' ') .any(|s| s == "file"), + hunk_header_style_include_line_number: opt + .hunk_header_style + .split(' ') + .any(|s| s == "line-number"), hyperlinks: opt.hyperlinks, hyperlinks_file_link_format: opt.hyperlinks_file_link_format, inspect_raw_lines: opt.computed.inspect_raw_lines, |