about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2019-12-27 22:41:51 +0100
committerGitHub <noreply@github.com>2019-12-27 22:41:51 +0100
commite351a753b2a060392ea795e37120f4761ac41b4b (patch)
treef9b330d2888cace550fea7e4527ab1099410c9fb
parentcec6a8a95f403edab2929f271fa94b8752162b4d (diff)
parentfba70c637f47b1e43ed21e37f65ee4750f71b320 (diff)
downloadranger-e351a753b2a060392ea795e37120f4761ac41b4b.tar.gz
Merge pull request #1793 from toonn/fix-fuzzy-tab
Fix fuzzy tab completion when prefix is valid dir
-rwxr-xr-xranger/config/commands.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 06d5abb7..c2a02b67 100755
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -243,8 +243,9 @@ class cd(Command):
 
         paths = self._tab_fuzzy_match(basepath, tokens)
         if not os.path.isabs(dest):
-            paths_rel = basepath
-            paths = [os.path.relpath(path, paths_rel) for path in paths]
+            paths_rel = self.fm.thisdir.path
+            paths = [os.path.relpath(os.path.join(basepath, path), paths_rel)
+                     for path in paths]
         else:
             paths_rel = ''
         return paths, paths_rel