Fix ambigious keybinding detection.
Previously we only checked if the *last* char of the current keychain matches the last char of a binding, which e.g. matched 'la' when we pressed 'ka'. Now we simply check if the binding *starts* with the keychain, which also is easier to do.
This commit is contained in:
parent
7aef865b0d
commit
53464dcbab
@ -215,10 +215,7 @@ class BaseKeyParser(QObject):
|
|||||||
if definitive_match is not None and binding == definitive_match[0]:
|
if definitive_match is not None and binding == definitive_match[0]:
|
||||||
# We already matched that one
|
# We already matched that one
|
||||||
continue
|
continue
|
||||||
if len(binding) < len(cmd_input):
|
elif binding.startswith(cmd_input):
|
||||||
# binding is shorter than cmd_input, so it can't possibly match
|
|
||||||
continue
|
|
||||||
elif cmd_input[-1] == binding[len(cmd_input) - 1]:
|
|
||||||
partial_match = True
|
partial_match = True
|
||||||
break
|
break
|
||||||
if definitive_match is not None and partial_match:
|
if definitive_match is not None and partial_match:
|
||||||
|
Loading…
Reference in New Issue
Block a user