MCPcopy Create free account
hub / github.com/Autoparallel/learner / handle_down_navigation

Method handle_down_navigation

crates/learnerd/src/tui/state.rs:414–431  ·  view source on GitHub ↗

Handles downward navigation in both list and details views.

(&mut self)

Source from the content-addressed store, hash-verified

412
413 /// Handles downward navigation in both list and details views.
414 fn handle_down_navigation(&mut self) {
415 match self.focused_pane {
416 FocusedPane::List => {
417 let i = self.selected.selected().unwrap_or(0);
418 if i < self.papers.len().saturating_sub(1) {
419 self.selected.select(Some(i + 1));
420 self.needs_redraw = true;
421 }
422 },
423 FocusedPane::Details =>
424 if let Some(max) = self.max_scroll {
425 if self.scroll_position < max {
426 self.scroll_position += 1;
427 self.needs_redraw = true;
428 }
429 },
430 }
431 }
432
433 /// Attempts to open the selected paper's PDF with the system viewer.
434 ///

Callers 1

handle_normal_inputMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected