mirror of
https://github.com/godotengine/godot.git
synced 2025-10-23 09:53:25 +00:00
Merge pull request #28099 from lupoDharkael/fix-completion
Fix code completion not working with class_name
This commit is contained in:
commit
b9dc2e7e4d
9 changed files with 20 additions and 20 deletions
|
@ -735,7 +735,7 @@ void ScriptTextEditor::_code_complete_script(const String &p_code, List<String>
|
|||
base = _find_node_for_script(base, base, script);
|
||||
}
|
||||
String hint;
|
||||
Error err = script->get_language()->complete_code(p_code, script->get_path().get_base_dir(), base, r_options, r_force, hint);
|
||||
Error err = script->get_language()->complete_code(p_code, script->get_path(), base, r_options, r_force, hint);
|
||||
if (err == OK && hint != "") {
|
||||
code_editor->get_text_edit()->set_code_hint(hint);
|
||||
}
|
||||
|
@ -766,7 +766,7 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c
|
|||
EditorNode::get_singleton()->load_resource(p_symbol);
|
||||
}
|
||||
|
||||
} else if (script->get_language()->lookup_code(code_editor->get_text_edit()->get_text_for_lookup_completion(), p_symbol, script->get_path().get_base_dir(), base, result) == OK) {
|
||||
} else if (script->get_language()->lookup_code(code_editor->get_text_edit()->get_text_for_lookup_completion(), p_symbol, script->get_path(), base, result) == OK) {
|
||||
|
||||
_goto_line(p_row);
|
||||
|
||||
|
@ -1447,7 +1447,7 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
|
|||
base = _find_node_for_script(base, base, script);
|
||||
}
|
||||
ScriptLanguage::LookupResult result;
|
||||
if (script->get_language()->lookup_code(code_editor->get_text_edit()->get_text_for_lookup_completion(), word_at_mouse, script->get_path().get_base_dir(), base, result) == OK) {
|
||||
if (script->get_language()->lookup_code(code_editor->get_text_edit()->get_text_for_lookup_completion(), word_at_mouse, script->get_path(), base, result) == OK) {
|
||||
open_docs = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue