diff options
author | Canop <cano.petrole@gmail.com> | 2020-07-02 15:41:08 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2020-07-02 15:41:08 +0200 |
commit | 96606ee8942fc06734dcfc0fd8607df62c6bee2a (patch) | |
tree | 81c70fcfdd868cd4c69c535decb667e1fb83eaf3 | |
parent | 5b5e2105fd0688e3dfbe81edcc11e774205cd780 (diff) |
version 0.18.4v0.18.4
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | Cargo.lock | 2 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/display/displayable_tree.rs | 27 |
4 files changed, 11 insertions, 24 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index b712578..24bb0e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ -### next version +<a name="v0.18.4"></a> +### v0.18.4 - 2020-07-02 - `--git-status` launch option +- fix rendering on windows <a name="v0.18.3"></a> ### v0.18.3 - 2020-06-30 @@ -84,7 +84,7 @@ dependencies = [ [[package]] name = "broot" -version = "0.18.3-dev" +version = "0.18.4" dependencies = [ "bet", "chrono", @@ -1,6 +1,6 @@ [package] name = "broot" -version = "0.18.3-dev" +version = "0.18.4" authors = ["dystroy <denys.seguret@gmail.com>"] repository = "https://github.com/Canop/broot" documentation = "https://dystroy.org/broot" diff --git a/src/display/displayable_tree.rs b/src/display/displayable_tree.rs index 927601a..489ec75 100644 --- a/src/display/displayable_tree.rs +++ b/src/display/displayable_tree.rs @@ -32,24 +32,6 @@ use {crate::permissions, std::os::unix::fs::MetadataExt, umask::*}; static LONG_SPACE: &str = " "; static LONG_BRANCH: &str = "───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────"; -//fn repeat<'w, W: Write>( -// w: W, -// lg: &'static str, -// style: -// len: usize, -//) -> Result<(), ProgramError> { -// -// if self.in_app { -// let style = if selected { -// &self.skin.selected_line -// } else { -// &self.skin.default -// }; -// cw.fill(style, ' ')?; -// } -// Ok(()) -//} - /// A tree wrapper which can be used either /// - to write on the screen in the application, /// - or to write in a file or an exported string. @@ -290,9 +272,9 @@ impl<'s, 't> DisplayableTree<'s, 't> { selected: bool, ) -> Result<usize, ProgramError> { cond_bg!(branch_style, self, selected, self.skin.tree); + let mut branch = String::new(); for depth in 0..line.depth { - cw.queue_str( - &branch_style, + branch.push_str( if line.left_branchs[depth as usize] { if self.tree.has_branch(line_index + 1, depth as usize) { if depth == line.depth - 1 { @@ -306,7 +288,10 @@ impl<'s, 't> DisplayableTree<'s, 't> { } else { " " }, - )?; + ); + } + if !branch.is_empty() { + cw.queue_string(&branch_style, branch)?; } Ok(0) } |