aboutsummaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/app.rs b/src/app.rs
index 61b2657..04468a6 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -27,6 +27,7 @@ use std::{
27 path::{Path, PathBuf}, 27 path::{Path, PathBuf},
28}; 28};
29 29
30use log::info;
30use obi::{CompressionType, Image}; 31use obi::{CompressionType, Image};
31use sdl2::{ 32use sdl2::{
32 event::Event, 33 event::Event,
@@ -744,6 +745,7 @@ impl<'ctx> AppState<'ctx> {
744 self.mode = Mode::Command; 745 self.mode = Mode::Command;
745 } 746 }
746 } 747 }
748 info!("key press: {:?}", &event);
747 match self.mode { 749 match self.mode {
748 Mode::Draw => { 750 Mode::Draw => {
749 match event { 751 match event {
@@ -825,6 +827,7 @@ impl<'ctx> AppState<'ctx> {
825 .. 827 ..
826 } if self.keybinds.contains_key(&Keybind::new(k, keymod)) => { 828 } if self.keybinds.contains_key(&Keybind::new(k, keymod)) => {
827 let body = 829 let body =
830 // clone here because body can modify itself
828 self.keybinds.get(&Keybind::new(k, keymod)).unwrap().clone(); 831 self.keybinds.get(&Keybind::new(k, keymod)).unwrap().clone();
829 self.eval_expr(&body); 832 self.eval_expr(&body);
830 } 833 }