Browse Source

GDScript: Don't highlight unexposed classes

HolonProduction 10 months ago
parent
commit
e999f11d53
1 changed files with 3 additions and 1 deletions
  1. 3 1
      modules/gdscript/editor/gdscript_highlighter.cpp

+ 3 - 1
modules/gdscript/editor/gdscript_highlighter.cpp

@@ -701,7 +701,9 @@ void GDScriptSyntaxHighlighter::_update_cache() {
 	List<StringName> types;
 	List<StringName> types;
 	ClassDB::get_class_list(&types);
 	ClassDB::get_class_list(&types);
 	for (const StringName &E : types) {
 	for (const StringName &E : types) {
-		class_names[E] = types_color;
+		if (ClassDB::is_class_exposed(E)) {
+			class_names[E] = types_color;
+		}
 	}
 	}
 
 
 	/* User types. */
 	/* User types. */