Adjust :unbind signature to match :bind
This commit is contained in:
parent
f70c5968a9
commit
b04a233e8d
|
|
@ -933,13 +933,15 @@ How many tabs to switch back.
|
|||
|
||||
[[unbind]]
|
||||
=== unbind
|
||||
Syntax: +:unbind 'key' ['mode']+
|
||||
Syntax: +:unbind [*--mode* 'mode'] 'key'+
|
||||
|
||||
Unbind a keychain.
|
||||
|
||||
==== positional arguments
|
||||
* +'key'+: The keychain or special key (inside <...>) to unbind.
|
||||
* +'mode'+: A mode to unbind the key in (default: `normal`). See `:help bindings.commands` for the available modes.
|
||||
|
||||
==== optional arguments
|
||||
* +*-m*+, +*--mode*+: A mode to unbind the key in (default: `normal`). See `:help bindings.commands` for the available modes.
|
||||
|
||||
|
||||
[[undo]]
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ class ConfigCommands:
|
|||
raise cmdexc.CommandError("bind: {}".format(e))
|
||||
|
||||
@cmdutils.register(instance='config-commands')
|
||||
def unbind(self, key, mode='normal'):
|
||||
def unbind(self, key, *, mode='normal'):
|
||||
"""Unbind a keychain.
|
||||
|
||||
Args:
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@ class TestBindConfigCommand:
|
|||
Should show an error.
|
||||
"""
|
||||
with pytest.raises(cmdexc.CommandError, match=expected):
|
||||
commands.unbind(key, mode)
|
||||
commands.unbind(key, mode=mode)
|
||||
|
||||
|
||||
class TestConfig:
|
||||
|
|
|
|||
Loading…
Reference in New Issue