mirror of
https://github.com/bootandy/dust.git
synced 2025-12-05 20:40:11 -08:00
Compare commits
1 Commits
3cce61f854
...
skip_total
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73936a6d0c |
@@ -134,16 +134,8 @@ pub fn draw_it(
|
||||
root_node: &DisplayNode,
|
||||
skip_total: bool,
|
||||
) {
|
||||
let biggest = match skip_total {
|
||||
false => root_node,
|
||||
true => root_node
|
||||
.get_children_from_node(false)
|
||||
.next()
|
||||
.unwrap_or(root_node),
|
||||
};
|
||||
|
||||
let num_chars_needed_on_left_most = if idd.by_filecount {
|
||||
let max_size = biggest.size;
|
||||
let max_size = root_node.size;
|
||||
max_size.separate_with_commas().chars().count()
|
||||
} else if idd.by_filetime.is_some() {
|
||||
FILETIME_SHOW_LENGTH
|
||||
@@ -172,7 +164,7 @@ pub fn draw_it(
|
||||
let display_data = DisplayData {
|
||||
initial: idd,
|
||||
num_chars_needed_on_left_most,
|
||||
base_size: biggest.size,
|
||||
base_size: root_node.size,
|
||||
longest_string_length,
|
||||
ls_colors: LsColors::from_env().unwrap_or_default(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user