Fix --list-themes pager init so less stays interactive

This commit is contained in:
abhinavcool42 committed 2025-10-30 18:42:35 +05:30
1 parent a8140f91cc
commit 1852dea96a
2 files changed
+3

No files matched your search

+1
View File
@@ -205,6 +205,7 @@ pub fn list_themes(
style.insert(StyleComponent::Plain); style.insert(StyleComponent::Plain);
config.language = Some("Rust"); config.language = Some("Rust");
config.style_components = StyleComponents(style); config.style_components = StyleComponents(style);
config.paging_mode = PagingMode::Always;
let mut output_type = let mut output_type =
OutputType::from_mode(config.paging_mode, config.wrapping_mode, config.pager)?; OutputType::from_mode(config.paging_mode, config.wrapping_mode, config.pager)?;
+2
View File
@@ -141,6 +141,7 @@ impl OutputType {
// //
// For newer versions (530 or 558 on Windows), we omit '--no-init' as it // For newer versions (530 or 558 on Windows), we omit '--no-init' as it
// is not needed anymore. // is not needed anymore.
if single_screen_action == SingleScreenAction::Quit {
match retrieve_less_version(&pager.bin) { match retrieve_less_version(&pager.bin) {
None => { None => {
p.arg("--no-init"); p.arg("--no-init");
@@ -152,6 +153,7 @@ impl OutputType {
} }
_ => {} _ => {}
} }
}
} else { } else {
p.args(args); p.args(args);
} }