Make :config-write-py work again
This commit is contained in:
parent
0f907b1a77
commit
615c6ffe5a
@ -313,12 +313,15 @@ class ConfigCommands:
|
||||
"overwrite!".format(filename))
|
||||
|
||||
if defaults:
|
||||
options = [(opt, opt.default)
|
||||
options = [(None, opt, opt.default)
|
||||
for _name, opt in sorted(configdata.DATA.items())]
|
||||
bindings = dict(configdata.DATA['bindings.default'].default)
|
||||
commented = True
|
||||
else:
|
||||
options = list(self._config)
|
||||
options = []
|
||||
for values in self._config:
|
||||
for scoped in values:
|
||||
options.append((scoped.pattern, values.opt, scoped.value))
|
||||
bindings = dict(self._config.get_mutable_obj('bindings.commands'))
|
||||
commented = False
|
||||
|
||||
|
@ -388,7 +388,8 @@ class ConfigPyWriter:
|
||||
|
||||
def _gen_options(self):
|
||||
"""Generate the options part of the config."""
|
||||
for opt, value in self._options:
|
||||
# FIXME:conf handle _pattern
|
||||
for _pattern, opt, value in self._options:
|
||||
if opt.name in ['bindings.commands', 'bindings.default']:
|
||||
continue
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user