summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorryuta69 <eyma22s.yu@gmail.com>2020-07-31 07:11:09 +0900
committerGitHub <noreply@github.com>2020-07-30 18:11:09 -0400
commit1249df9d438c98d8da5bab273e180d88d4d50b38 (patch)
tree38f9c79f6291f1f63dab3eb14d7a2c2b7053d1df /src/main.rs
parentc5733826b988fe54fbc0298512e222ba057df3bc (diff)
Honor width option in git_config
* Update width to accept gitconfig value * Feature set width from gitconfig only when cli option is not supplied * Add unittest of width in gitconfig * Delete duplicate field of width It's already roled by decorations_width. * Fix show_config of width with decorations_width * Fix test not with static number but dynamic variable * Fix the way of getting value of user configured width use gather_builtin_features_recursively in set_options is the ideal way, it can get inside custom_features and set as option. * Refactor checking if none * Fix if width is assigned variable then output variable
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index f66bf489..68954326 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -185,6 +185,7 @@ fn show_config(config: &config::Config) {
navigate = {navigate}
paging = {paging_mode}
syntax-theme = {syntax_theme}
+ width = {width}
tabs = {tab_width}
word-diff-regex = {tokenization_regex}",
true_color = config.true_color,
@@ -205,6 +206,10 @@ fn show_config(config: &config::Config) {
.clone()
.map(|t| t.name.unwrap_or("none".to_string()))
.unwrap_or("none".to_string()),
+ width = match config.decorations_width {
+ cli::Width::Fixed(width) => width.to_string(),
+ cli::Width::Variable => "variable".to_string()
+ },
tab_width = config.tab_width,
tokenization_regex = format_option_value(&config.tokenization_regex.to_string()),
);