summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs
index 23b7b97d..02608eb2 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -73,7 +73,7 @@ pub struct Config {
pub syntax_dummy_theme: SyntaxTheme,
pub syntax_set: SyntaxSet,
pub syntax_theme: Option<SyntaxTheme>,
- pub tab_width: usize,
+ pub tab_string: String,
pub tokenization_regex: Regex,
pub true_color: bool,
pub truncation_symbol: String,
@@ -218,7 +218,11 @@ impl From<cli::Opt> for Config {
syntax_dummy_theme: SyntaxTheme::default(),
syntax_set: opt.computed.syntax_set,
syntax_theme: opt.computed.syntax_theme,
- tab_width: opt.tab_width,
+ tab_string: if let Some(s) = opt.tab_string {
+ s
+ } else {
+ " ".repeat(opt.tab_width)
+ },
tokenization_regex,
true_color: opt.computed.true_color,
truncation_symbol: "→".to_string(),