1
0
mirror of https://github.com/bobwen-dev/hunter synced 2025-04-12 00:55:41 +02:00

print action on stderr

This commit is contained in:
rabite 2020-02-12 02:20:33 +01:00
parent 74e43ee965
commit 800401825c

View File

@ -53,6 +53,7 @@ where
}
fn do_key(&mut self, key: Key) -> HResult<()> {
dbg!(&key);
let gkey = AnyKey::from(key);
// Moving takes priority
@ -61,6 +62,7 @@ where
.keybinds
.movement
.get(gkey) {
dbg!(movement);
match self.movement(movement) {
Ok(()) => return Ok(()),
Err(HError::KeyBind(KeyBindError::MovementUndefined)) => {}
@ -73,11 +75,11 @@ where
let bindings = self.search_in();
if let Some(action) = bindings.get(key) {
return self.do_action(action)
return self.do_action(dbg!(action))
} else if let Some(any_key) = gkey.any() {
if let Some(action) = bindings.get(any_key) {
let action = action.insert_key_param(key);
return self.do_action(&action);
return self.do_action(dbg!(&action));
}
}