summaryrefslogtreecommitdiffstats
path: root/src/key_command/impl_interactive.rs
blob: 8171ecb8b5e1de2afad2f9d286e3832d87a25332 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::commands::*;
use crate::context::AppContext;

use super::{Command, InteractiveExecute};

impl InteractiveExecute for Command {
    #[allow(clippy::single_match)]
    fn interactive_execute(&self, context: &mut AppContext) {
        match self {
            Self::SearchIncremental { pattern } => {
                search_string::search_string(context, pattern.as_str(), true)
            }
            Self::Filter { pattern } => {
                filter::filter(context, pattern).ok();
            }
            _ => (),
        }
    }
}