Add PaneGrid::on_key_press for hotkey logic

This commit is contained in:
Héctor Ramón Jiménez 2020-03-17 06:53:57 +01:00
parent 56ba6215a2
commit a280dcda23
2 changed files with 52 additions and 3 deletions

View file

@ -186,6 +186,13 @@ impl Internal {
self.action
}
pub fn idle_pane(&self) -> Option<Pane> {
match self.action {
Action::Idle { focus } => focus,
_ => None,
}
}
pub fn picked_pane(&self) -> Option<Pane> {
match self.action {
Action::Dragging { pane } => Some(pane),