Merge remote-tracking branch 'origin/pr/3196'
This commit is contained in:
commit
c883d6b429
@ -355,14 +355,16 @@ class ConfigPyWriter:
|
|||||||
if normal_bindings:
|
if normal_bindings:
|
||||||
yield self._line('# Bindings for normal mode')
|
yield self._line('# Bindings for normal mode')
|
||||||
for key, command in sorted(normal_bindings.items()):
|
for key, command in sorted(normal_bindings.items()):
|
||||||
yield self._line('config.bind({!r}, {!r})'.format(key, command))
|
yield self._line('config.bind({!r}, {!r})'.format(
|
||||||
|
key, command))
|
||||||
|
yield ''
|
||||||
|
|
||||||
for mode, mode_bindings in sorted(self._bindings.items()):
|
for mode, mode_bindings in sorted(self._bindings.items()):
|
||||||
yield ''
|
|
||||||
yield self._line('# Bindings for {} mode'.format(mode))
|
yield self._line('# Bindings for {} mode'.format(mode))
|
||||||
for key, command in sorted(mode_bindings.items()):
|
for key, command in sorted(mode_bindings.items()):
|
||||||
yield self._line('config.bind({!r}, {!r}, mode={!r})'.format(
|
yield self._line('config.bind({!r}, {!r}, mode={!r})'.format(
|
||||||
key, command, mode))
|
key, command, mode))
|
||||||
|
yield ''
|
||||||
|
|
||||||
|
|
||||||
def read_config_py(filename, raising=False):
|
def read_config_py(filename, raising=False):
|
||||||
|
@ -667,7 +667,7 @@ class TestConfigPyWriter:
|
|||||||
|
|
||||||
# Bindings for caret mode
|
# Bindings for caret mode
|
||||||
config.bind(',y', 'message-info caret', mode='caret')
|
config.bind(',y', 'message-info caret', mode='caret')
|
||||||
""").strip()
|
""").lstrip()
|
||||||
|
|
||||||
def test_binding_options_hidden(self):
|
def test_binding_options_hidden(self):
|
||||||
opt1 = configdata.DATA['bindings.default']
|
opt1 = configdata.DATA['bindings.default']
|
||||||
|
Loading…
Reference in New Issue
Block a user