diff options
author | toonn <toonn@toonn.io> | 2021-01-23 17:21:04 +0100 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2021-01-23 17:21:04 +0100 |
commit | 07bad7490a5dc019a58740b0323377437ab1e5da (patch) | |
tree | b5d0739f2ac05ffd635ad3d1988c847a599944cf /ranger | |
parent | 6e78bbe39a5a5edecf6021788a63799333fa7e43 (diff) | |
parent | 5e617cd098bd38479e4e36341864a14780bfdc8a (diff) | |
download | ranger-07bad7490a5dc019a58740b0323377437ab1e5da.tar.gz |
Merge branch 'ferreum-fix-console-without-position'
Diffstat (limited to 'ranger')
-rwxr-xr-x | ranger/config/commands.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py index ea2ab982..90f509ab 100755 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -838,7 +838,7 @@ class console(Command): def execute(self): position = None - command = "" + command = self.rest(1) if self.arg(1)[0:2] == '-p': command = self.rest(2) try: @@ -847,12 +847,11 @@ class console(Command): pass elif self.arg(1)[0:2] == '-s': command = self.rest(3) - separate = self.arg(2) - position = command.find(separate) - if position != -1: - command = command.replace(separate, '', 1) - else: - position = None + sentinel = self.arg(2) + pos = command.find(sentinel) + if pos != -1: + command = command.replace(sentinel, '', 1) + position = pos self.fm.open_console(command, position=position) |