summaryrefslogtreecommitdiffstats
path: root/src/print.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/print.rs')
-rw-r--r--src/print.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/print.rs b/src/print.rs
index 86313a3..d9364d8 100644
--- a/src/print.rs
+++ b/src/print.rs
@@ -6,7 +6,7 @@ use {
display::{Cols, DisplayableTree, Screen},
errors::ProgramError,
launchable::Launchable,
- skin::{PanelSkin, StyleMap},
+ skin::{ExtColorMap, PanelSkin, StyleMap},
tree::Tree,
},
pathdiff,
@@ -57,9 +57,10 @@ fn print_tree_to_file(
screen: &mut Screen,
file_path: &str,
cols: &Cols,
+ ext_colors: &ExtColorMap,
) -> Result<AppStateCmdResult, ProgramError> {
let no_style_skin = StyleMap::no_term();
- let dp = DisplayableTree::out_of_app(tree, &no_style_skin, cols, screen.width);
+ let dp = DisplayableTree::out_of_app(tree, &no_style_skin, cols, ext_colors, screen.width);
let mut f = OpenOptions::new()
.create(true)
.append(true)
@@ -76,7 +77,7 @@ pub fn print_tree(
) -> Result<AppStateCmdResult, ProgramError> {
if let Some(ref output_path) = con.launch_args.file_export_path {
// an output path was provided, we write to it
- print_tree_to_file(tree, screen, output_path, &con.cols)
+ print_tree_to_file(tree, screen, output_path, &con.cols, &con.ext_colors)
} else {
// no output path provided. We write on stdout, but we must
// do it after app closing to have the normal terminal
@@ -90,6 +91,7 @@ pub fn print_tree(
screen,
styles,
con.cols,
+ con.ext_colors.clone(),
)))
}
}