summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-07 19:37:50 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-07 19:37:50 +0100
commit3f95b39cb3a17e25d0344e986c6bd5c69443b4b5 (patch)
treec2928c3ab447927dff5b9eac7494384363311164
parent8be4feec04d17b638bb4f6d1aedeca54b1ff1a2c (diff)
parent7eb6367d5cb62fb48563ad940423198f792e3fe8 (diff)
Merge pull request #72789 from Vilcrow/fix-jump-to-definition
Fixed the jumping to function definition using 'Ctrl+LMB'.
-rw-r--r--modules/gdscript/gdscript_editor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 8cfd48b52b..3543c0a79f 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -3491,6 +3491,14 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
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;
}