QScintilla/Editor.py

branch
APIs
changeset 5349
bccda3b5920a
parent 5158
b85f06f38f21
child 5358
2584d0a08bf4
--- a/QScintilla/Editor.py	Wed Nov 30 18:54:04 2016 +0100
+++ b/QScintilla/Editor.py	Wed Nov 30 19:59:57 2016 +0100
@@ -1578,7 +1578,12 @@
         self.lexer_.initProperties()
         
         # initialize the lexer APIs settings
-        api = self.vm.getAPIsManager().getAPIs(self.apiLanguage)
+        if self.project.isOpen() and self.project.isProjectFile(filename):
+            projectType = self.project.getProjectType()
+        else:
+            projectType = ""
+        api = self.vm.getAPIsManager().getAPIs(self.apiLanguage,
+                                               projectType=projectType)
         if api is not None and not api.isEmpty():
             self.lexer_.setAPIs(api.getQsciAPIs())
             self.acAPI = True

eric ide

mercurial