From 5207918432db641622108589f94e88b887f5e267 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Fri, 26 Apr 2013 14:10:48 -0700 Subject: [PATCH] Fix bug with [File] being shown instead of [Dir] This is for filename completion in the case of C-family include completion. The path was being assembled incorrectly so os.isdir() was getting the wrong path and then could not see was it a directory. --- python/completers/general/filename_completer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/completers/general/filename_completer.py b/python/completers/general/filename_completer.py index cee693ce..da5de7f2 100644 --- a/python/completers/general/filename_completer.py +++ b/python/completers/general/filename_completer.py @@ -103,7 +103,7 @@ class FilenameCompleter( ThreadedCompleter ): except: relative_paths = [] - paths.extend( os.path.join( include_path, relative_path ) for + paths.extend( os.path.join( include_path, path_dir, relative_path ) for relative_path in relative_paths ) return sorted( set( paths ) )