Make command dispatching work
This commit is contained in:
@@ -44,19 +44,6 @@ impl KeyBinding {
|
||||
pending_keystrokes: &[Keystroke],
|
||||
contexts: &[&DispatchContext],
|
||||
) -> KeyMatch {
|
||||
let should_debug = self.keystrokes.len() == 1
|
||||
&& self.keystrokes[0].key == "p"
|
||||
&& self.keystrokes[0].modifiers.command == true
|
||||
&& self.keystrokes[0].modifiers.shift == true;
|
||||
|
||||
if false && should_debug {
|
||||
dbg!(
|
||||
&self.keystrokes,
|
||||
&pending_keystrokes,
|
||||
&contexts,
|
||||
&self.matches_context(contexts)
|
||||
);
|
||||
}
|
||||
if self.keystrokes.as_ref().starts_with(&pending_keystrokes)
|
||||
&& self.matches_context(contexts)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,6 @@ impl KeyMatcher {
|
||||
keystroke: &Keystroke,
|
||||
context_stack: &[&DispatchContext],
|
||||
) -> KeyMatch {
|
||||
dbg!(keystroke, &context_stack);
|
||||
let keymap = self.keymap.lock();
|
||||
// Clear pending keystrokes if the keymap has changed since the last matched keystroke.
|
||||
if keymap.version() != self.keymap_version {
|
||||
|
||||
Reference in New Issue
Block a user