Merge remote-tracking branch 'origin/pr/3196'

This commit is contained in:
Florian Bruhin 2017-10-26 08:46:21 +02:00
commit c883d6b429
2 changed files with 6 additions and 4 deletions

View File

@ -354,15 +354,17 @@ class ConfigPyWriter:
normal_bindings = self._bindings.pop('normal', {})
if normal_bindings:
yield self._line('# Bindings for normal mode')
for key, command in sorted(normal_bindings.items()):
yield self._line('config.bind({!r}, {!r})'.format(key, command))
for key, command in sorted(normal_bindings.items()):
yield self._line('config.bind({!r}, {!r})'.format(
key, command))
yield ''
for mode, mode_bindings in sorted(self._bindings.items()):
yield ''
yield self._line('# Bindings for {} mode'.format(mode))
for key, command in sorted(mode_bindings.items()):
yield self._line('config.bind({!r}, {!r}, mode={!r})'.format(
key, command, mode))
yield ''
def read_config_py(filename, raising=False):

View File

@ -667,7 +667,7 @@ class TestConfigPyWriter:
# Bindings for caret mode
config.bind(',y', 'message-info caret', mode='caret')
""").strip()
""").lstrip()
def test_binding_options_hidden(self):
opt1 = configdata.DATA['bindings.default']