Allow empty keys in config
This commit is contained in:
parent
678abca244
commit
836a5e04a5
1
TODO
1
TODO
@ -40,7 +40,6 @@ Ctrl+A/X to increase/decrease last number in URL
|
||||
command completion gets hidden when doing a new ValueList value
|
||||
logging contexts
|
||||
catch import errors for PyQt and QtWebKit
|
||||
Allow binding to empty values for keys to override defaults
|
||||
How do we handle empty values in input bar?
|
||||
- Add more element-selection-detection code (with options?) based on:
|
||||
-> javascript: http://stackoverflow.com/a/2848120/2085149
|
||||
|
@ -430,6 +430,8 @@ class Command(BaseType):
|
||||
typestr = 'command'
|
||||
|
||||
def validate(self, value):
|
||||
if not value:
|
||||
return
|
||||
if value.split()[0] not in cmdutils.cmd_dict:
|
||||
raise ValidationError(value, "must be a valid command!")
|
||||
|
||||
|
@ -309,7 +309,9 @@ class BaseKeyParser(QObject):
|
||||
if not sect.items():
|
||||
logging.warn("No keybindings defined!")
|
||||
for (key, cmd) in sect.items():
|
||||
if key.startswith('<') and key.endswith('>'):
|
||||
if not cmd:
|
||||
continue
|
||||
elif key.startswith('<') and key.endswith('>'):
|
||||
keystr = self._normalize_keystr(key[1:-1])
|
||||
logging.debug("registered special key: {} -> {}".format(keystr,
|
||||
cmd))
|
||||
|
Loading…
Reference in New Issue
Block a user