summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorS.V.I. Vilcrow <svi@vilcrow.net>2023-02-06 14:19:20 +0300
committerS.V.I. Vilcrow <svi@vilcrow.net>2023-02-07 05:29:48 +0300
commit7eb6367d5cb62fb48563ad940423198f792e3fe8 (patch)
treed05a86603f6b9fd2da8667d4201ee460313a7348
parente08aa365160ee68a78b75660c28dfcd41608d981 (diff)
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 12c10642ec..61ed88a9ca 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -3480,6 +3480,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;
}