ok/jj
1
0
Fork 0
forked from mirrors/jj

cli: fix --no-pager to persist across layered config loading

This commit is contained in:
Yuya Nishihara 2023-08-12 13:25:42 +09:00
parent 1d4b5d04fa
commit 28633bb754
2 changed files with 1 additions and 6 deletions

View file

@ -2488,7 +2488,7 @@ fn handle_early_args(
args.config_toml.push(format!(r#"ui.color="{choice}""#));
}
if args.no_pager.unwrap_or_default() {
ui.set_pagination(crate::ui::PaginationChoice::Never);
args.config_toml.push(r#"ui.paginate="never""#.to_owned());
}
if !args.config_toml.is_empty() {
layered_configs.parse_config_args(&args.config_toml)?;

View file

@ -132,11 +132,6 @@ impl Ui {
Ok(())
}
/// Sets the pagination value.
pub fn set_pagination(&mut self, choice: PaginationChoice) {
self.paginate = choice;
}
/// Switches the output to use the pager, if allowed.
#[instrument(skip_all)]
pub fn request_pager(&mut self) {