Merge pull request #1435 from matthiasbeyer/imag-view/fix-autowrapping

Fix: Do not automatically wrap text
This commit is contained in:
Matthias Beyer 2018-04-22 15:55:19 +02:00 committed by GitHub
commit c3fe934119
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -173,7 +173,7 @@ fn main() {
} else {
let mut viewer = StdoutViewer::new(view_header, !hide_content);
if rt.cli().is_present("autowrap") {
if rt.cli().occurrences_of("autowrap") != 0 {
let width = rt.cli().value_of("autowrap").unwrap(); // ensured by clap
let width = usize::from_str(width).unwrap_or_else(|e| {
error!("Failed to parse argument to number: autowrap = {:?}",