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:
parent
74e43ee965
commit
800401825c
@ -53,6 +53,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn do_key(&mut self, key: Key) -> HResult<()> {
|
fn do_key(&mut self, key: Key) -> HResult<()> {
|
||||||
|
dbg!(&key);
|
||||||
let gkey = AnyKey::from(key);
|
let gkey = AnyKey::from(key);
|
||||||
|
|
||||||
// Moving takes priority
|
// Moving takes priority
|
||||||
@ -61,6 +62,7 @@ where
|
|||||||
.keybinds
|
.keybinds
|
||||||
.movement
|
.movement
|
||||||
.get(gkey) {
|
.get(gkey) {
|
||||||
|
dbg!(movement);
|
||||||
match self.movement(movement) {
|
match self.movement(movement) {
|
||||||
Ok(()) => return Ok(()),
|
Ok(()) => return Ok(()),
|
||||||
Err(HError::KeyBind(KeyBindError::MovementUndefined)) => {}
|
Err(HError::KeyBind(KeyBindError::MovementUndefined)) => {}
|
||||||
@ -73,11 +75,11 @@ where
|
|||||||
let bindings = self.search_in();
|
let bindings = self.search_in();
|
||||||
|
|
||||||
if let Some(action) = bindings.get(key) {
|
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() {
|
} else if let Some(any_key) = gkey.any() {
|
||||||
if let Some(action) = bindings.get(any_key) {
|
if let Some(action) = bindings.get(any_key) {
|
||||||
let action = action.insert_key_param(key);
|
let action = action.insert_key_param(key);
|
||||||
return self.do_action(&action);
|
return self.do_action(dbg!(&action));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user