Clarify motivations in comment

ida_star
Wilfred Hughes 2021-08-29 23:30:59 +07:00
parent 6d270d8206
commit d4121b6c0e
1 changed files with 4 additions and 1 deletions

@ -228,9 +228,12 @@ pub fn display(
lhs_formatted_length,
rhs_column_width,
if atty::is(Stream::Stdout) {
// If we're displaying directly to a user's terminal,
// honour the terminal width.
terminal_width
} else {
// Assume a pager like less.
// Don't truncate the RHS source when output is being
// piped elsewhere. E.g. the user is using `less`.
1000
},
);