diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-04-20 02:20:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-20 02:20:04 +0200 |
commit | 22b9c0207bf3a50bcc0db6df8af5ec2d8631abcc (patch) | |
tree | 5da42a60b092003ae4a933f2bceab8fd8fab713e /editor/plugins/script_text_editor.cpp | |
parent | c88f56be643c8635b3f9284b9e48a96be63bbc46 (diff) | |
parent | 4b8568006d1f83d518d98ef3c7354b7c25de46cc (diff) | |
download | redot-engine-22b9c0207bf3a50bcc0db6df8af5ec2d8631abcc.tar.gz |
Merge pull request #8417 from neikeq/hello-there
External editor improvements and fixes
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 0eb53d1a66..052c19f34e 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -69,26 +69,6 @@ Ref<Script> ScriptTextEditor::get_edited_script() const { return script; } -bool ScriptTextEditor::goto_method(const String &p_method) { - - Vector<String> functions = get_functions(); - - String method_search = p_method + ":"; - - for (int i = 0; i < functions.size(); i++) { - String function = functions[i]; - - if (function.begins_with(method_search)) { - - int line = function.get_slice(":", 1).to_int(); - goto_line(line - 1); - return true; - } - } - - return false; -} - void ScriptTextEditor::_load_theme_settings() { TextEdit *text_edit = code_editor->get_text_edit(); @@ -386,7 +366,7 @@ void ScriptTextEditor::tag_saved_version() { } void ScriptTextEditor::goto_line(int p_line, bool p_with_error) { - code_editor->get_text_edit()->cursor_set_line(p_line); + code_editor->get_text_edit()->call_deferred("cursor_set_line", p_line); } void ScriptTextEditor::ensure_focus() { |