You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
External editor improvements and fixes
Notable changes:
- Now ScriptLanguages have the option to override the global external editor setting.
If `ScriptLanguage::open_in_external_editor()` returns `ERR_UNAVAILABLE` (which it does by default), then the global external editor option will be used.
- Added formatting to the external editor execution arguments. Now it's possible to write something like this: `{project} -g {file}:{line}:{col}`.
- `VisualScript::get_member_line()` now can return the line of functions (well, it returns the id of the _Function_ node of the function). I guess there is nothing else we can get a "line" from.
Fixes:
- Fixes a bug where `ScriptEditor::script_goto_method()` would not work if the script is not already open in the built-in editor.
- Fixes wrong DEFVAL for `cursor_set_column` and `cursor_set_line` in TextEdit.
- `Script::get_member_line()` now returns -1 ("found nothing") by default.
This commit is contained in:
@@ -2153,7 +2153,7 @@ void VisualScriptEditor::goto_line(int p_line, bool p_with_error) {
|
||||
_update_graph();
|
||||
_update_members();
|
||||
|
||||
call_deferred("_center_on_node", p_line); //editor might be just created and size might not exist yet
|
||||
call_deferred("call_deferred", "_center_on_node", p_line); //editor might be just created and size might not exist yet
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -2192,18 +2192,6 @@ void VisualScriptEditor::get_breakpoints(List<int> *p_breakpoints) {
|
||||
}
|
||||
}
|
||||
|
||||
bool VisualScriptEditor::goto_method(const String &p_method) {
|
||||
|
||||
if (!script->has_function(p_method))
|
||||
return false;
|
||||
|
||||
edited_func = p_method;
|
||||
selected = edited_func;
|
||||
_update_members();
|
||||
_update_graph();
|
||||
return true;
|
||||
}
|
||||
|
||||
void VisualScriptEditor::add_callback(const String &p_function, PoolStringArray p_args) {
|
||||
|
||||
if (script->has_function(p_function)) {
|
||||
|
||||
Reference in New Issue
Block a user