aboutsummaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/app.rs b/src/app.rs
index 0eac084..9ba93f4 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -248,6 +248,7 @@ impl<'ctx> AppState<'ctx> {
248 } 248 }
249 249
250 fn eval_command(&mut self) { 250 fn eval_command(&mut self) {
251 self.command_box.hist_append();
251 match self.command_box.text.as_str() { 252 match self.command_box.text.as_str() {
252 "(save)" => { 253 "(save)" => {
253 let image = self.export(); 254 let image = self.export();
@@ -648,7 +649,11 @@ impl<'ctx> AppState<'ctx> {
648 Keycode::Delete => self.command_box.delete(), 649 Keycode::Delete => self.command_box.delete(),
649 Keycode::Left => self.command_box.backward(), 650 Keycode::Left => self.command_box.backward(),
650 Keycode::Right => self.command_box.forward(), 651 Keycode::Right => self.command_box.forward(),
651 Keycode::Return => self.eval_command(), 652 Keycode::Up => self.command_box.hist_prev(),
653 Keycode::Down => self.command_box.hist_next(),
654 Keycode::Return => {
655 self.eval_command();
656 }
652 Keycode::Escape => { 657 Keycode::Escape => {
653 self.command_box.clear(); 658 self.command_box.clear();
654 self.mode = Mode::Draw; 659 self.mode = Mode::Draw;