From d87021de93a2620de3a2a13815d37ebd484fc545 Mon Sep 17 00:00:00 2001 From: mawenzy Date: Tue, 9 Apr 2019 22:07:13 +0200 Subject: [PATCH] Bind goto_line function for Script Editor #9153 - added doc for ScriptEditor:goto_line --- doc/classes/ScriptEditor.xml | 9 +++++++++ editor/plugins/script_editor_plugin.cpp | 1 + 2 files changed, 10 insertions(+) diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml index 8f1f393da44..ab646a3854b 100644 --- a/doc/classes/ScriptEditor.xml +++ b/doc/classes/ScriptEditor.xml @@ -57,6 +57,15 @@ Returns an array with all [Script] objects which are currently open in editor. + + + + + + + Goes to the specified line in the current script. + + diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index d7d4cec07df..4e992db735f 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2883,6 +2883,7 @@ void ScriptEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("can_drop_data_fw", "point", "data", "from"), &ScriptEditor::can_drop_data_fw); ClassDB::bind_method(D_METHOD("drop_data_fw", "point", "data", "from"), &ScriptEditor::drop_data_fw); + ClassDB::bind_method(D_METHOD("goto_line", "line_number"), &ScriptEditor::_goto_script_line2); ClassDB::bind_method(D_METHOD("get_current_script"), &ScriptEditor::_get_current_script); ClassDB::bind_method(D_METHOD("get_open_scripts"), &ScriptEditor::_get_open_scripts); ClassDB::bind_method(D_METHOD("open_script_create_dialog", "base_name", "base_path"), &ScriptEditor::open_script_create_dialog);