binocular/runtime/interactive/handlers/
mod.rs1pub mod help;
2pub mod key;
3pub mod preview;
4pub mod search;
5
6pub use help::handle_help_modal_input;
7pub use key::handle_input;
8pub use preview::{
9 handle_preview_mode_input, scroll_preview_page, sync_preview, toggle_window_mode,
10};
11pub use search::handle_search_mode_input;
12
13pub(crate) fn check_infinite_scroll(
14 app: &crate::app::App,
15 item_limit: &mut u32,
16 tx_cmd: &impl crate::infra::channel::Sender<crate::search::matcher::MatcherCommand>,
17) {
18 if app.search_session.search.total_matches > *item_limit as u64
19 && app.search_session.search.selection
20 >= app.search_session.search.results.len().saturating_sub(10)
21 {
22 *item_limit += 100;
23 let _ = tx_cmd.send(crate::search::matcher::MatcherCommand::Resize(*item_limit));
24 }
25}