Fix protected-access for last_command (not sure what to do for _modes and _not_modes)
This commit is contained in:
parent
81f25251a5
commit
7a6d26ef86
@ -1981,8 +1981,8 @@ class CommandDispatcher:
|
|||||||
Args:
|
Args:
|
||||||
count: Which numeric argument to give the command.
|
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.")
|
raise cmdexc.CommandError("You didn't do anything yet.")
|
||||||
runners.CommandRunner(self._win_id).run(
|
runners.CommandRunner(self._win_id).run(
|
||||||
runners._last_command[0],
|
runners.last_command[0],
|
||||||
count if count is not None else runners._last_command[1])
|
count if count is not None else runners.last_command[1])
|
||||||
|
@ -32,7 +32,7 @@ from qutebrowser.misc import split
|
|||||||
|
|
||||||
ParseResult = collections.namedtuple('ParseResult', ['cmd', 'args', 'cmdline',
|
ParseResult = collections.namedtuple('ParseResult', ['cmd', 'args', 'cmdline',
|
||||||
'count'])
|
'count'])
|
||||||
_last_command = None
|
last_command = None
|
||||||
|
|
||||||
|
|
||||||
def _current_url(tabbed_browser):
|
def _current_url(tabbed_browser):
|
||||||
@ -291,8 +291,8 @@ class CommandRunner(QObject):
|
|||||||
usertypes.KeyMode.normal in result.cmd._modes) and
|
usertypes.KeyMode.normal in result.cmd._modes) and
|
||||||
(result.cmd._not_modes is None or
|
(result.cmd._not_modes is None or
|
||||||
usertypes.KeyMode.normal not in result.cmd._not_modes)):
|
usertypes.KeyMode.normal not in result.cmd._not_modes)):
|
||||||
global _last_command
|
global last_command
|
||||||
_last_command = (text, count)
|
last_command = (text, count)
|
||||||
|
|
||||||
@pyqtSlot(str, int)
|
@pyqtSlot(str, int)
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
|
Loading…
Reference in New Issue
Block a user