aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/YouCompleteMe/ycm_extra_conf.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/YouCompleteMe/ycm_extra_conf.py b/contrib/YouCompleteMe/ycm_extra_conf.py
index 8c013598cc..249220bb2b 100644
--- a/contrib/YouCompleteMe/ycm_extra_conf.py
+++ b/contrib/YouCompleteMe/ycm_extra_conf.py
@@ -1,5 +1,6 @@
# .ycm_extra_conf.py for nvim source code.
-import os, ycm_core
+import os
+import ycm_core
def DirectoryOfThisScript():
@@ -24,9 +25,9 @@ def GetCompilationInfoForFile(filename):
return None
if IsHeaderFile(filename):
basename = os.path.splitext(filename)[0]
- replacement_file = basename + '.c'
- if os.path.exists(replacement_file):
- compilation_info = database.GetCompilationInfoForFile(replacement_file)
+ c_file = basename + '.c'
+ if os.path.exists(c_file):
+ compilation_info = database.GetCompilationInfoForFile(c_file)
if compilation_info.compiler_flags_:
return compilation_info
return None