ls: rename the function for something more explicit

This commit is contained in:
Sylvestre Ledru 2023-09-20 22:00:30 +02:00
parent 23ee9b622d
commit 1d10e0c674
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@ pub fn indent(out: &mut BufWriter<Stdout>) -> UResult<()> {
Ok(())
}
pub fn calculate_offset_and_push(dired: &mut DiredOutput, path_len: usize) {
pub fn calculate_subdired(dired: &mut DiredOutput, path_len: usize) {
let offset = if dired.subdired_positions.is_empty() {
DIRED_TRAILING_OFFSET
} else {

View file

@ -1921,7 +1921,7 @@ pub fn list(locs: Vec<&Path>, config: &Config) -> UResult<()> {
}
writeln!(out, "{}:", path_data.p_buf.display())?;
if config.dired {
dired::calculate_offset_and_push(&mut dired, path_data.display_name.len());
dired::calculate_subdired(&mut dired, path_data.display_name.len());
}
} else {
writeln!(out, "\n{}:", path_data.p_buf.display())?;