diff options
-rw-r--r-- | ranger/config/commands.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py index abc616ee..c467fb7c 100644 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -1044,8 +1044,11 @@ class scout(Command): self.fm.move(right=1) if self.KEEP_OPEN in flags and thisdir != self.fm.thisdir: - # reopen the console: - self.fm.open_console(self.line[0:-len(pattern)]) + # reopen the console: + if not pattern: + self.fm.open_console(self.line) + else: + self.fm.open_console(self.line[0:-len(pattern)]) if thisdir != self.fm.thisdir and pattern != "..": self.fm.block_input(0.5) |