summaryrefslogtreecommitdiffstats
path: root/src/state/mod.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-01-03 06:44:23 -0500
committerJesse Luehrs <doy@tozt.net>2022-01-03 07:05:53 -0500
commit6c79e520f02e7d05f389db5856fda250437a563f (patch)
treeb0357b5ca41439e7a2ff59602febc4dbf2d0ca35 /src/state/mod.rs
parentae132f478c6cfc6ffb062fecd7efb42ac4e5d804 (diff)
downloadnbsh-6c79e520f02e7d05f389db5856fda250437a563f.tar.gz
nbsh-6c79e520f02e7d05f389db5856fda250437a563f.zip
more clone cleanups
Diffstat (limited to 'src/state/mod.rs')
-rw-r--r--src/state/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/state/mod.rs b/src/state/mod.rs
index 3317b32..20261cf 100644
--- a/src/state/mod.rs
+++ b/src/state/mod.rs
@@ -224,7 +224,7 @@ impl State {
Ok(ast) => {
let idx = self
.history
- .run(&ast, event_w.clone())
+ .run(ast, event_w.clone())
.await
.unwrap();
self.set_focus(Focus::History(idx), Some(entry))
@@ -336,12 +336,11 @@ impl State {
textmode::Key::Ctrl(b'm') => {
let input = self.readline.input();
if !input.is_empty() {
- self.readline.clear_input();
- match self.parse(&input) {
+ match self.parse(input) {
Ok(ast) => {
let idx = self
.history
- .run(&ast, event_w.clone())
+ .run(ast, event_w.clone())
.await
.unwrap();
self.set_focus(Focus::History(idx), None).await;
@@ -353,6 +352,7 @@ impl State {
.await;
}
}
+ self.readline.clear_input();
}
}
textmode::Key::Ctrl(b'u') => self.readline.clear_backwards(),