You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Editor Help: Add syntax highlighting for code blocks
This commit is contained in:
@@ -165,6 +165,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "modules/modules_enabled.gen.h" // For gdscript, mono.
|
||||
|
||||
EditorNode *EditorNode::singleton = nullptr;
|
||||
|
||||
static const String EDITOR_NODE_CONFIG_SECTION = "EditorNode";
|
||||
@@ -576,6 +578,9 @@ void EditorNode::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_POSTINITIALIZE: {
|
||||
EditorHelp::generate_doc();
|
||||
#if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED)
|
||||
EditorHelpHighlighter::create_singleton();
|
||||
#endif
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_PROCESS: {
|
||||
@@ -801,6 +806,12 @@ void EditorNode::_notification(int p_what) {
|
||||
_update_update_spinner();
|
||||
_update_vsync_mode();
|
||||
}
|
||||
|
||||
#if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED)
|
||||
if (EditorSettings::get_singleton()->check_changed_settings_in_group("text_editor/theme/highlighting")) {
|
||||
EditorHelpHighlighter::get_singleton()->reset_cache();
|
||||
}
|
||||
#endif
|
||||
} break;
|
||||
}
|
||||
}
|
||||
@@ -7420,6 +7431,9 @@ EditorNode::~EditorNode() {
|
||||
|
||||
remove_print_handler(&print_handler);
|
||||
EditorHelp::cleanup_doc();
|
||||
#if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED)
|
||||
EditorHelpHighlighter::free_singleton();
|
||||
#endif
|
||||
memdelete(editor_selection);
|
||||
memdelete(editor_plugins_over);
|
||||
memdelete(editor_plugins_force_over);
|
||||
|
||||
Reference in New Issue
Block a user