Blacklist prompt-accept, remove mode_allowed

This commit is contained in:
Jan Verbeek 2016-07-12 00:23:34 +02:00
parent 955478799b
commit 508c0f21fa
2 changed files with 1 additions and 10 deletions

View File

@ -502,12 +502,3 @@ class Command:
log.commands.debug('Calling {}'.format(
debug_utils.format_call(self.handler, posargs, kwargs)))
self.handler(*posargs, **kwargs)
def mode_allowed(self, mode):
"""Check if the command can be run in the given mode.
Args:
mode: The mode to check.
"""
return ((self._modes is None or mode in self._modes) and
(self._not_modes is None or mode not in self._not_modes))

View File

@ -289,7 +289,7 @@ class CommandRunner(QObject):
mode_manager = objreg.get('mode-manager', scope='window',
window=self._win_id)
if (result.cmdline[0] != 'repeat-command' and
result.cmd.mode_allowed(mode_manager.mode)):
result.cmdline[0] != 'prompt-accept'):
last_command[mode_manager.mode] = (
self._parse_count(text)[1],
count if count is not None else result.count)