diff options
author | rabite0 <rabite@posteo.de> | 2020-03-01 22:57:09 +0100 |
---|---|---|
committer | rabite0 <rabite@posteo.de> | 2020-03-01 22:57:09 +0100 |
commit | e4850e38b603c4adc99fbdcedc80de7c2dfbe775 (patch) | |
tree | b526d3bfd1a45bd007c0280b74d4f8d3929bc76a /src/quick_actions.rs | |
parent | b163a9f4b400b4b14d96beacce912be47fa00f8a (diff) |
improved navigation/turbo-cd
Diffstat (limited to 'src/quick_actions.rs')
-rw-r--r-- | src/quick_actions.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/quick_actions.rs b/src/quick_actions.rs index 5a08e0e..74ff9db 100644 --- a/src/quick_actions.rs +++ b/src/quick_actions.rs @@ -277,7 +277,15 @@ pub fn open(files: Vec<File>, act_base.map(|act| action_view.content.push(act)).ok(); act_sub.map(|act| action_view.content.push(act)).ok(); - action_view.popup() + loop { + // TODO: Handle this properly + match action_view.popup() { + Err(HError::RefreshParent) => continue, + Err(HError::WidgetResizedError) => continue, + Err(HError::TerminalResizedError) => continue, + r @ _ => break r + } + } } @@ -355,6 +363,7 @@ impl QuickAction { files: Vec<File>, core: &WidgetCore, proc_view: Arc<Mutex<ProcView>>) -> HResult<()> { + use crate::minibuffer::MiniBufferEvent::*;; let answers = self.queries .iter() @@ -364,7 +373,7 @@ impl QuickAction { if acc.is_err() { return acc; } match core.minibuffer(query) { - Err(HError::MiniBufferEmptyInput) => { + Err(HError::MiniBufferEvent(Empty)) => { acc.as_mut() .map(|acc| acc.push((OsString::from(query), OsString::from("")))) |