mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Merge pull request #8417 from neikeq/hello-there
External editor improvements and fixes
This commit is contained in:
commit
22b9c0207b
11 changed files with 74 additions and 66 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue