summaryrefslogtreecommitdiffstats
path: root/editor/plugins/text_editor.cpp
diff options
context:
space:
mode:
authorDualMatrix <piet.goris@gmail.com>2018-09-20 01:39:01 +0200
committerDualMatrix <piet.goris@gmail.com>2018-09-20 11:31:53 +0200
commit4efcf9c94384fff34f9f3b629e48aa392ac6b3a0 (patch)
tree8e30d1f077aee36f5be6cb84610e766598aeab97 /editor/plugins/text_editor.cpp
parente20a28a7db090dbf39bc8c90487c3d7beb84cbb8 (diff)
downloadredot-engine-4efcf9c94384fff34f9f3b629e48aa392ac6b3a0.tar.gz
Fixed syntax highlighting setting not being saved
Fixed syntax highlighting setting not being saved
Diffstat (limited to 'editor/plugins/text_editor.cpp')
-rw-r--r--editor/plugins/text_editor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index 3bf4140591..4ff7046a35 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -66,6 +66,7 @@ void TextEditor::_change_syntax_highlighter(int p_idx) {
el = el->next();
}
set_syntax_highlighter(highlighters[highlighter_menu->get_item_text(p_idx)]);
+ EditorSettings::get_singleton()->set_project_metadata("text_editor", "syntax_highlighter", p_idx);
}
void TextEditor::_load_theme_settings() {
@@ -298,7 +299,7 @@ void TextEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY:
_load_theme_settings();
- set_syntax_highlighter(NULL);
+ _change_syntax_highlighter(EditorSettings::get_singleton()->get_project_metadata("text_editor", "syntax_highlighter", 0));
break;
}
}