about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/config/commands.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 18b2f395..9a42f66d 100644
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -1067,11 +1067,14 @@ class narrow(Command):
     """
 
     def execute(self):
+        results = len(self.fm.thisdir.files)
         self.cancel() # Clean up
         if self.rest(1) == "..":
             self.fm.move(left=1)
-        else:
+        elif results > 0:
             self.fm.move(right=1)
+        else:
+            self.fm.cd(self.rest(1))
 
     def cancel(self):
         self.fm.thisdir.temporary_filter = None