From 7eb6367d5cb62fb48563ad940423198f792e3fe8 Mon Sep 17 00:00:00 2001 From: "S.V.I. Vilcrow" Date: Mon, 6 Feb 2023 14:19:20 +0300 Subject: [PATCH] Fixed the jumping to function definition using 'Ctrl+LMB'. --- modules/gdscript/gdscript_editor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 12c10642ec2c..61ed88a9ca65 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -3480,6 +3480,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; }