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 authored and David Peter committed 2020-10-08 18:51:42 +02:00
1 parent b6e729abeb
commit bbef2f41ec
2 files changed
+20 -6

No files matched your search

+4 -1
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"))]