Use one-line view when output is not to a terminal

This commit is contained in:
Ben S 2014-07-22 20:50:53 +01:00
parent 44a9819417
commit 35a0ba3ba0

View File

@ -74,8 +74,10 @@ impl Options {
Lines
}
else {
let (console_width, _) = term::dimensions().unwrap_or((80, 24));
Grid(matches.opt_present("across"), console_width)
match term::dimensions() {
None => Lines,
Some((width, _)) => Grid(matches.opt_present("across"), width),
}
}
}