Skip to content

Commit

Permalink
Merge pull request #72789 from Vilcrow/fix-jump-to-definition
Browse files Browse the repository at this point in the history
Fixed the jumping to function definition using 'Ctrl+LMB'.
  • Loading branch information
akien-mga committed Feb 7, 2023
2 parents 8be4fee + 7eb6367 commit 3f95b39
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/gdscript/gdscript_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3491,6 +3491,14 @@ ::Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symb
break;
}

if (context.current_class) {
if (context.type != GDScriptParser::COMPLETION_SUPER_METHOD) {
base.type = context.current_class->get_datatype();
} else {
base.type = context.current_class->base_type;
}
}

if (_lookup_symbol_from_base(base.type, p_symbol, is_function, r_result) == OK) {
return OK;
}
Expand Down

0 comments on commit 3f95b39

Please sign in to comment.