Browse Source

Fix autocomplete for variable which is assigned to in the current statement

cdemirer 3 years ago
parent
commit
3a827349bf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/gdscript/gdscript_editor.cpp

+ 1 - 1
modules/gdscript/gdscript_editor.cpp

@@ -1843,7 +1843,7 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context,
 
 
 	while (suite) {
 	while (suite) {
 		for (int i = 0; i < suite->statements.size(); i++) {
 		for (int i = 0; i < suite->statements.size(); i++) {
-			if (suite->statements[i]->start_line > p_context.current_line) {
+			if (suite->statements[i]->end_line >= p_context.current_line) {
 				break;
 				break;
 			}
 			}