浏览代码

LSP: Fix goto native declaration

HolonProduction 2 月之前
父节点
当前提交
87bbad5e8c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/gdscript/language_server/gdscript_text_document.cpp

+ 1 - 1
modules/gdscript/language_server/gdscript_text_document.cpp

@@ -496,8 +496,8 @@ Array GDScriptTextDocument::find_symbols(const LSP::TextDocumentPositionParams &
 			if (file_checker->file_exists(path)) {
 			if (file_checker->file_exists(path)) {
 				arr.push_back(location.to_json());
 				arr.push_back(location.to_json());
 			}
 			}
-			r_list.push_back(symbol);
 		}
 		}
+		r_list.push_back(symbol);
 	} else if (GDScriptLanguageProtocol::get_singleton()->is_smart_resolve_enabled()) {
 	} else if (GDScriptLanguageProtocol::get_singleton()->is_smart_resolve_enabled()) {
 		List<const LSP::DocumentSymbol *> list;
 		List<const LSP::DocumentSymbol *> list;
 		GDScriptLanguageProtocol::get_singleton()->get_workspace()->resolve_related_symbols(p_location, list);
 		GDScriptLanguageProtocol::get_singleton()->get_workspace()->resolve_related_symbols(p_location, list);