mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-12-25 01:46:02 +00:00
Fix bug where details view needed a terminal width
The buggy code assumed that, if output isn't to a terminal, then the only view available is the Lines view. This is incorrect, as the Details view doesn't require a set width either, so check for --long even when there's no set width.
This commit is contained in:
parent
41905eaba4
commit
1756a0a841
@ -265,11 +265,25 @@ impl View {
|
||||
TerminalColours::Automatic => Colours::plain(),
|
||||
};
|
||||
|
||||
let lines = Lines {
|
||||
colours: colours,
|
||||
};
|
||||
if matches.opt_present("tree") {
|
||||
let details = Details {
|
||||
columns: None,
|
||||
header: false,
|
||||
recurse: dir_action.recurse_options(),
|
||||
filter: filter,
|
||||
xattr: false,
|
||||
colours: colours,
|
||||
};
|
||||
|
||||
Ok(View::Lines(lines))
|
||||
Ok(View::Details(details))
|
||||
}
|
||||
else {
|
||||
let lines = Lines {
|
||||
colours: colours,
|
||||
};
|
||||
|
||||
Ok(View::Lines(lines))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user