Fix keyhintwidget
This commit is contained in:
parent
22f096088b
commit
aa75262fe4
@ -91,15 +91,18 @@ class KeyHintView(QLabel):
|
|||||||
return
|
return
|
||||||
|
|
||||||
blacklist = config.val.keyhint.blacklist or []
|
blacklist = config.val.keyhint.blacklist or []
|
||||||
keyconf = objreg.get('key-config')
|
|
||||||
|
|
||||||
def blacklisted(keychain):
|
def blacklisted(keychain):
|
||||||
return any(fnmatch.fnmatchcase(keychain, glob)
|
return any(fnmatch.fnmatchcase(keychain, glob)
|
||||||
for glob in blacklist)
|
for glob in blacklist)
|
||||||
|
|
||||||
|
if config.val.bindings.commands[modename] is None:
|
||||||
|
bindings = []
|
||||||
|
else:
|
||||||
bindings = [(k, v) for (k, v)
|
bindings = [(k, v) for (k, v)
|
||||||
in keyconf.get_bindings_for(modename).items()
|
in config.val.bindings.commands[modename].items()
|
||||||
if k.startswith(prefix) and not utils.is_special_key(k) and
|
if k.startswith(prefix) and
|
||||||
|
not utils.is_special_key(k) and
|
||||||
not blacklisted(k)]
|
not blacklisted(k)]
|
||||||
|
|
||||||
if not bindings:
|
if not bindings:
|
||||||
|
Loading…
Reference in New Issue
Block a user