summaryrefslogtreecommitdiffstats
path: root/src/actioner.rs
diff options
context:
space:
mode:
authorqkzk <qu3nt1n@gmail.com>2022-12-05 22:21:36 +0100
committerqkzk <qu3nt1n@gmail.com>2022-12-05 22:21:36 +0100
commit70fc5c0c23161180e18a142c5885ba7210db3c59 (patch)
tree6f620115c9bad462ea45a1b33f090ff8c1ca93bc /src/actioner.rs
parentf823b4e64c464acef5dec136c077bc5fb3a3c9ec (diff)
refactor
Diffstat (limited to 'src/actioner.rs')
-rw-r--r--src/actioner.rs23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/actioner.rs b/src/actioner.rs
index 171a49f..39fd5f1 100644
--- a/src/actioner.rs
+++ b/src/actioner.rs
@@ -31,8 +31,6 @@ impl Actioner {
Event::Key(Key::Backspace) => self.backspace(status),
Event::Key(Key::Ctrl('d')) => self.delete(status),
Event::Key(Key::Ctrl('q')) => self.escape(status),
- Event::Key(Key::Delete) => self.delete(status),
- Event::Key(Key::Insert) => self.insert(status),
Event::Key(Key::Char(c)) => self.char(status, c),
Event::Key(Key::Home) => self.home(status),
Event::Key(Key::End) => self.end(status),
@@ -174,23 +172,10 @@ impl Actioner {
status.selected().event_delete_chars_right();
Ok(())
}
-
- Mode::Normal => {
- status.drop_tab();
- Ok(())
- }
_ => Ok(()),
}
}
- /// Insert a new tab in normal mode
- fn insert(&self, status: &mut Status) -> FmResult<()> {
- if let Mode::Normal = status.selected().mode {
- status.new_tab()
- };
- Ok(())
- }
-
/// Move to top or beggining of line.
fn home(&self, status: &mut Status) -> FmResult<()> {
match status.selected().mode {
@@ -331,13 +316,7 @@ impl Actioner {
}
Mode::Normal => match self.binds.get(&c) {
Some(event_char) => event_char.match_char(status),
- None => {
- if c.is_ascii_digit() {
- eprintln!("char {} is a digit", c);
- status.go_tab(c)
- }
- Ok(())
- }
+ None => Ok(()),
},
Mode::Help | Mode::Preview | Mode::Shortcut => status.selected().event_normal(),
Mode::Jump => Ok(()),