keyconfparser: Add empty sections.
This commit is contained in:
parent
95d8091205
commit
277dab4069
@ -114,9 +114,12 @@ class KeyConfigParser:
|
|||||||
"""Load the built-in default keybindings."""
|
"""Load the built-in default keybindings."""
|
||||||
for sectname, sect in configdata.KEY_DATA.items():
|
for sectname, sect in configdata.KEY_DATA.items():
|
||||||
sectname = self._normalize_sectname(sectname)
|
sectname = self._normalize_sectname(sectname)
|
||||||
for command, keychains in sect.items():
|
if not sect:
|
||||||
for e in keychains:
|
self.keybindings[sectname] = collections.OrderedDict()
|
||||||
self._add_binding(sectname, e, command)
|
else:
|
||||||
|
for command, keychains in sect.items():
|
||||||
|
for e in keychains:
|
||||||
|
self._add_binding(sectname, e, command)
|
||||||
|
|
||||||
def _read(self):
|
def _read(self):
|
||||||
"""Read the config file from disk and parse it."""
|
"""Read the config file from disk and parse it."""
|
||||||
|
Loading…
Reference in New Issue
Block a user