From 156daddaaf16e36eb932452d1e30f4f77d29aae6 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Sat, 7 Mar 2020 14:29:44 +0000 Subject: Expose Syntax highlighter for editor plugins --- modules/gdscript/editor/gdscript_highlighter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/gdscript/editor/gdscript_highlighter.cpp') diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index 4be83877be..8ab3dc1d56 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -387,6 +387,8 @@ void GDScriptSyntaxHighlighter::_update_cache() { type_color = EDITOR_GET("text_edit/highlighting/base_type_color"); } -SyntaxHighlighter *GDScriptSyntaxHighlighter::create() { - return memnew(GDScriptSyntaxHighlighter); +Ref GDScriptSyntaxHighlighter::_create() const { + Ref syntax_highlighter; + syntax_highlighter.instance(); + return syntax_highlighter; } -- cgit v1.2.3