aboutsummaryrefslogtreecommitdiff
path: root/modules/mono/editor/godotsharp_editor.cpp
diff options
context:
space:
mode:
authorIgnacio Etcheverry2018-01-09 17:19:37 +0100
committerIgnacio Etcheverry2018-01-09 17:25:23 +0100
commit1c6269f2dd3e1a46dbb6a36c3363c9c535be8b64 (patch)
treee66c28aba939862ca7971c9c093db6f16ac0977d /modules/mono/editor/godotsharp_editor.cpp
parent5be356b72f5b765cdec069c2c4a4011a42fabc47 (diff)
downloadgodot-1c6269f2dd3e1a46dbb6a36c3363c9c535be8b64.tar.gz
godot-1c6269f2dd3e1a46dbb6a36c3363c9c535be8b64.tar.zst
godot-1c6269f2dd3e1a46dbb6a36c3363c9c535be8b64.zip
Diffstat (limited to 'modules/mono/editor/godotsharp_editor.cpp')
-rw-r--r--modules/mono/editor/godotsharp_editor.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/mono/editor/godotsharp_editor.cpp b/modules/mono/editor/godotsharp_editor.cpp
index da0a7b4fb..9e48da68c 100644
--- a/modules/mono/editor/godotsharp_editor.cpp
+++ b/modules/mono/editor/godotsharp_editor.cpp
@@ -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: