Fix code lens for variable instantiations

This commit is contained in:
Jacob Dufault 2017-04-20 23:46:53 -07:00
parent 11d6623938
commit 5ef4f55053
2 changed files with 2 additions and 1 deletions

View File

@ -1513,7 +1513,7 @@ void QueryDbMainLoop(
QueryType& type = db->types[symbol.idx];
AddCodeLens(&common, ref.loc.OffsetStartColumn(0), type.uses, "ref", "refs");
AddCodeLens(&common, ref.loc.OffsetStartColumn(1), ToQueryLocation(db, type.derived), "derived", "derived");
AddCodeLens(&common, ref.loc.OffsetStartColumn(2), ToQueryLocation(db, type.instantiations), "instantiation", "instantiations");
AddCodeLens(&common, ref.loc.OffsetStartColumn(2), ToQueryLocation(db, type.instantiations), "var", "vars");
break;
}
case SymbolKind::Func: {

View File

@ -674,6 +674,7 @@ void QueryDatabase::ApplyIndexUpdate(IndexUpdate* update) {
RemoveUsrs(update->types_removed);
ImportOrUpdate(update->types_def_update);
HANDLE_MERGEABLE(types_derived, derived, types);
HANDLE_MERGEABLE(types_instantiations, instantiations, types);
HANDLE_MERGEABLE(types_uses, uses, types);
RemoveUsrs(update->funcs_removed);