diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-06-30 08:31:03 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-06-30 08:46:00 -0400 |
commit | eb202089a504098380f5454fb5c8858917148fd7 (patch) | |
tree | 7f7afb907b7b710b50321095668bb2ce419a443c /src/cli.rs | |
parent | 1ea2c4e7af6c3a6e2165a14979458972d03ebda1 (diff) |
Add more computed values to options struct
Diffstat (limited to 'src/cli.rs')
-rw-r--r-- | src/cli.rs | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -11,6 +11,7 @@ use syntect::highlighting::Theme as SyntaxTheme; use syntect::parsing::SyntaxSet; use crate::bat::assets::HighlightingAssets; +use crate::bat::output::PagingMode; use crate::git_config::GitConfig; use crate::options; @@ -509,6 +510,28 @@ pub struct ComputedValues { pub syntax_set: SyntaxSet, pub syntax_theme: Option<SyntaxTheme>, pub syntax_dummy_theme: SyntaxTheme, + pub true_color: bool, + pub decorations_width: Width, + pub background_color_extends_to_terminal_width: bool, + pub paging_mode: PagingMode, +} + +#[derive(Clone, Debug)] +pub enum Width { + Fixed(usize), + Variable, +} + +impl Default for Width { + fn default() -> Self { + Width::Variable + } +} + +impl Default for PagingMode { + fn default() -> Self { + PagingMode::Never + } } impl Opt { |