Add -S flag to less when --wrap=never (closes #1255)

Prevent less from wrapping lines by setting the proper flag when `--wrap=never`.
If the user set a custom value for `--pager`, no additional flag is set.
This commit is contained in:
gahag
2020-10-07 12:28:25 -03:00
committed by David Peter
parent b6e729abeb
commit bbef2f41ec
2 changed files with 20 additions and 6 deletions

View File

@ -54,7 +54,10 @@ impl<'b> Controller<'b> {
paging_mode = PagingMode::Never;
}
}
output_type = OutputType::from_mode(paging_mode, self.config.pager)?;
let wrapping_mode = self.config.wrapping_mode;
output_type = OutputType::from_mode(paging_mode, wrapping_mode, self.config.pager)?;
}
#[cfg(not(feature = "paging"))]