summaryrefslogtreecommitdiffstats
path: root/editor/code_editor.cpp
diff options
context:
space:
mode:
authorPaulb23 <p_batty@hotmail.co.uk>2020-03-07 11:17:18 +0000
committerPaulb23 <p_batty@hotmail.co.uk>2020-07-11 15:26:58 +0100
commit2f1080be9b032b1cf5086201e45057baa6b1a179 (patch)
treec6af7f72914a1ea9c88eddb80925ae174cfbd8e3 /editor/code_editor.cpp
parentbe119c5c473be3fb73458baca7066d85869d6f1d (diff)
downloadredot-engine-2f1080be9b032b1cf5086201e45057baa6b1a179.tar.gz
Convert syntax highlighters into a resource
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r--editor/code_editor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 70747b4956..9e1a5f2d43 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1408,9 +1408,9 @@ Variant CodeTextEditor::get_edit_state() {
state["bookmarks"] = text_editor->get_bookmarks_array();
state["syntax_highlighter"] = TTR("Standard");
- SyntaxHighlighter *syntax_highlighter = text_editor->_get_syntax_highlighting();
- if (syntax_highlighter) {
- state["syntax_highlighter"] = syntax_highlighter->get_name();
+ Ref<SyntaxHighlighter> syntax_highlighter = text_editor->get_syntax_highlighting();
+ if (syntax_highlighter.is_valid()) {
+ state["syntax_highlighter"] = syntax_highlighter->_get_name();
}
return state;