You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
External editor fixes
- Fix VS Code opening on the previous line to the desired one. - Fix running MonoDevelop without the line and column parameters. - Fix `ScriptEditor::_goto_script_line` not working with language overriden external editors.
This commit is contained in:
@@ -151,7 +151,7 @@ Error GodotSharpEditor::open_in_external_editor(const Ref<Script> &p_script, int
|
||||
|
||||
if (p_line >= 0) {
|
||||
args.push_back("-g");
|
||||
args.push_back(script_path + ":" + itos(p_line) + ":" + itos(p_col));
|
||||
args.push_back(script_path + ":" + itos(p_line + 1) + ":" + itos(p_col));
|
||||
} else {
|
||||
args.push_back(script_path);
|
||||
}
|
||||
@@ -170,6 +170,11 @@ Error GodotSharpEditor::open_in_external_editor(const Ref<Script> &p_script, int
|
||||
monodevel_instance = memnew(MonoDevelopInstance(GodotSharpDirs::get_project_sln_path()));
|
||||
|
||||
String script_path = ProjectSettings::get_singleton()->globalize_path(p_script->get_path());
|
||||
|
||||
if (p_line >= 0) {
|
||||
script_path += ";" + itos(p_line + 1) + ";" + itos(p_col);
|
||||
}
|
||||
|
||||
monodevel_instance->execute(script_path);
|
||||
} break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user