Fix singleton-comparison

This commit is contained in:
Jan Verbeek 2016-06-27 18:21:35 +02:00
parent f654013372
commit 81f25251a5
2 changed files with 4 additions and 4 deletions

View File

@ -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 == 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 != None else runners._last_command[1]) count if count is not None else runners._last_command[1])

View File

@ -287,9 +287,9 @@ class CommandRunner(QObject):
result.cmd.run(self._win_id, args) result.cmd.run(self._win_id, args)
if (result.cmdline[0] != 'repeat-command' and if (result.cmdline[0] != 'repeat-command' and
(result.cmd._modes == None or (result.cmd._modes is None or
usertypes.KeyMode.normal in result.cmd._modes) and usertypes.KeyMode.normal in result.cmd._modes) and
(result.cmd._not_modes == 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)