aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/script_editor_plugin.cpp
diff options
context:
space:
mode:
authorIgnacio Etcheverry2017-09-03 21:23:36 +0200
committerIgnacio Etcheverry2017-09-03 21:23:36 +0200
commit52a7be4eefbafcc983766bd80a87752b678c1c17 (patch)
tree70b59ef4d7b645d59fc2eaf2fdfb0088a1176d1e /editor/plugins/script_editor_plugin.cpp
parent0b747c29106e0e02f8c9b674cde418a7d270d987 (diff)
downloadgodot-52a7be4eefbafcc983766bd80a87752b678c1c17.tar.gz
godot-52a7be4eefbafcc983766bd80a87752b678c1c17.tar.zst
godot-52a7be4eefbafcc983766bd80a87752b678c1c17.zip
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r--editor/plugins/script_editor_plugin.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index a529f152d..3033df763 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1539,8 +1539,14 @@ bool ScriptEditor::edit(const Ref<Script> &p_script, int p_line, int p_col, bool
bool open_dominant = EditorSettings::get_singleton()->get("text_editor/files/open_dominant_script_on_scene_change");
+ if (p_script->get_language()->overrides_external_editor()) {
+ Error err = p_script->get_language()->open_in_external_editor(p_script, p_line >= 0 ? p_line : 0, p_col);
+ if (err != OK)
+ ERR_PRINT("Couldn't open script in the overridden external text editor");
+ return false;
+ }
+
if ((debugger->get_dump_stack_script() != p_script || debugger->get_debug_with_external_editor()) &&
- p_script->get_language()->open_in_external_editor(p_script, p_line >= 0 ? p_line : 0, p_col) == OK &&
p_script->get_path().is_resource_file() &&
bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) {