Lines
62.5 %
Functions
50 %
Branches
100 %
//! Inherent intent handling for `ConfigTab`.
//!
//! Drawing stays on the inherent `draw(frame, area)` in `tabs::config`; this
//! block adds `handle` so `ViewMut`'s Config arm dispatches with no trait.
use crate::event::Intent;
use crate::tabs::config::ConfigTab;
use crate::view::{DrawCtx, Handled};
impl ConfigTab {
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,