瀏覽代碼

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

cdemirer 3 年之前
父節點
當前提交
3a827349bf
共有 1 個文件被更改,包括 1 次插入1 次删除
  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) {
 		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;
 			}