diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 95f69e663..f3d1f2a85 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1981,8 +1981,8 @@ class CommandDispatcher: Args: count: Which numeric argument to give the command. """ - if runners._last_command is None: + if runners.last_command is None: raise cmdexc.CommandError("You didn't do anything yet.") runners.CommandRunner(self._win_id).run( - runners._last_command[0], - count if count is not None else runners._last_command[1]) + runners.last_command[0], + count if count is not None else runners.last_command[1]) diff --git a/qutebrowser/commands/runners.py b/qutebrowser/commands/runners.py index 7581ae719..414a0d8a3 100644 --- a/qutebrowser/commands/runners.py +++ b/qutebrowser/commands/runners.py @@ -32,7 +32,7 @@ from qutebrowser.misc import split ParseResult = collections.namedtuple('ParseResult', ['cmd', 'args', 'cmdline', 'count']) -_last_command = None +last_command = None def _current_url(tabbed_browser): @@ -291,8 +291,8 @@ class CommandRunner(QObject): usertypes.KeyMode.normal in result.cmd._modes) and (result.cmd._not_modes is None or usertypes.KeyMode.normal not in result.cmd._not_modes)): - global _last_command - _last_command = (text, count) + global last_command + last_command = (text, count) @pyqtSlot(str, int) @pyqtSlot(str)