Lines
75 %
Functions
50 %
Branches
100 %
//! Inherent intent handling for `ListTab`.
//!
//! `ListTab` already carries the title-aware inherent `draw(frame, area, title)`
//! in `tabs::list`; this block adds its `handle` so `ViewMut`'s List arm can
//! dispatch directly with no trait indirection.
use crate::event::Intent;
use crate::tabs::list::ListTab;
use crate::view::{DrawCtx, Handled};
impl ListTab {
pub fn handle(&mut self, intent: Intent, _ctx: &DrawCtx) -> Handled {
match intent {
Intent::ListSelectNext => {
self.select_next();
Handled::Consumed(vec![])
}
Intent::ListSelectPrev => {
self.select_prev();
_ => Handled::Ignored,