summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2020-07-02 15:41:08 +0200
committerCanop <cano.petrole@gmail.com>2020-07-02 15:41:08 +0200
commit96606ee8942fc06734dcfc0fd8607df62c6bee2a (patch)
tree81c70fcfdd868cd4c69c535decb667e1fb83eaf3
parent5b5e2105fd0688e3dfbe81edcc11e774205cd780 (diff)
version 0.18.4v0.18.4
-rw-r--r--CHANGELOG.md4
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--src/display/displayable_tree.rs27
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
diff --git a/Cargo.lock b/Cargo.lock
index 7b0f163..b5ed458 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -84,7 +84,7 @@ dependencies = [
[[package]]
name = "broot"
-version = "0.18.3-dev"
+version = "0.18.4"
dependencies = [
"bet",
"chrono",
diff --git a/Cargo.toml b/Cargo.toml
index 96da3e5..8194e3c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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)
}