summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-06-30 08:31:03 -0400
committerDan Davison <dandavison7@gmail.com>2020-06-30 08:46:00 -0400
commiteb202089a504098380f5454fb5c8858917148fd7 (patch)
tree7f7afb907b7b710b50321095668bb2ce419a443c /src/cli.rs
parent1ea2c4e7af6c3a6e2165a14979458972d03ebda1 (diff)
Add more computed values to options struct
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 02458534..fbbc79a0 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -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 {