diff options
author | Canop <cano.petrole@gmail.com> | 2020-12-10 08:51:41 +0100 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2020-12-10 08:51:41 +0100 |
commit | 8f33f9478a4496d3a4034bc2888d75960cb2d042 (patch) | |
tree | 98ef510716c9bc55ae92850fcb772295c1586178 /src/display | |
parent | 7f635043bd7707225661029013b6863ef7f95d16 (diff) |
fix missing left margin
Diffstat (limited to 'src/display')
-rw-r--r-- | src/display/col.rs | 2 | ||||
-rw-r--r-- | src/display/displayable_tree.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/display/col.rs b/src/display/col.rs index 68446b2..ebe80da 100644 --- a/src/display/col.rs +++ b/src/display/col.rs @@ -99,9 +99,9 @@ pub type Cols = [Col;COLS_COUNT]; pub static DEFAULT_COLS: Cols = [ Col::Mark, Col::Git, + Col::Size, Col::Date, Col::Permission, - Col::Size, Col::Count, Col::Branch, Col::Name, diff --git a/src/display/displayable_tree.rs b/src/display/displayable_tree.rs index afea69b..0d519e6 100644 --- a/src/display/displayable_tree.rs +++ b/src/display/displayable_tree.rs @@ -416,6 +416,7 @@ impl<'s, 't> DisplayableTree<'s, 't> { let mut selected = false; let mut cw = CropWriter::new(f, self.area.width as usize); let cw = &mut cw; + let add_left_margin = self.cols[0] != Col::Mark || !self.show_selection_mark; if line_index < tree.lines.len() { let line = &tree.lines[line_index]; selected = self.in_app && line_index == tree.selection; @@ -426,8 +427,7 @@ impl<'s, 't> DisplayableTree<'s, 't> { } else { &self.skin.default }; - - if self.cols[0] != Col::Mark { + if add_left_margin { cw.queue_char(space_style, ' ')?; } for col in self.cols { |