mod browser;
mod pages;
mod search;
pub use browser::run_help_browser;
pub(crate) use pages::display_prepared_help_request;
pub(super) use pages::{HelpPageSelectorState, help_page_title};
use arf_harp::HarpResult;
const MIN_SIZE: super::MinimumSize = super::MinimumSize { cols: 30, rows: 8 };
fn help_library_paths_after_refresh(
refresh: HarpResult<Vec<String>>,
cached: impl FnOnce() -> Vec<String>,
) -> HarpResult<Vec<String>> {
match refresh {
Ok(paths) => Ok(paths),
Err(error) => {
let paths = cached();
if paths.is_empty() {
return Err(error);
}
log::warn!(
"Could not refresh R library paths for help; using the previous snapshot: {error}"
);
Ok(paths)
}
}
}