diff options
author | rabite <rabite@posteo.de> | 2019-02-26 01:28:56 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-02-26 01:28:56 +0100 |
commit | 16018ff604dac94def84dcd8db396853506e3d74 (patch) | |
tree | 7d52f04f7606dec01210e15276ee96ae9a01cd7e /src/tabview.rs | |
parent | a1230fed0d0a4092c5414206604505ba4ca560c4 (diff) |
expand $<num> to tab dir in exec command
Diffstat (limited to 'src/tabview.rs')
-rw-r--r-- | src/tabview.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tabview.rs b/src/tabview.rs index 675ba66..b16a251 100644 --- a/src/tabview.rs +++ b/src/tabview.rs @@ -11,12 +11,13 @@ pub trait Tabbable { fn get_tab_names(&self) -> Vec<Option<String>>; fn active_tab(&self) -> &dyn Widget; fn active_tab_mut(&mut self) -> &mut dyn Widget; + fn on_key_sub(&mut self, key: Key); fn on_key(&mut self, key: Key) { match key { Key::Ctrl('t') => { self.new_tab(); }, Key::Ctrl('w') => self.close_tab(), Key::Char('\t') => self.next_tab(), - _ => self.active_tab_mut().on_key(key) + _ => self.on_key_sub(key) } } } |