From a87e03fa707cfdd9779334d4bf177188bb54db5b Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 10 Dec 2021 23:07:08 -0500 Subject: space to recall focused command to the readline --- src/state.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/state.rs') diff --git a/src/state.rs b/src/state.rs index c31eba8..9ab76ce 100644 --- a/src/state.rs +++ b/src/state.rs @@ -139,6 +139,17 @@ impl State { ), )) } + textmode::Key::Char(' ') => { + if let Some(idx) = self.focus_idx() { + self.readline + .set_input(&self.history.history_cmd(idx).await); + Some(crate::action::Action::UpdateFocus( + crate::action::Focus::Readline, + )) + } else { + None + } + } _ => None, } } -- cgit v1.2.3-54-g00ecf