cquery
cquery copied to clipboard
dcc8eb28 looks suspect
I sort of see what that dcc8eb28 is aiming for, but I don't think that the resulting code looks right!
If we go through the branch with the removed return false, we've cleared uses. Here we used to break out of the enclosing EachEntityDef loop, leaving uses empty, and drop through to "... or the cursor is on a definition"
But now we add that definition to uses, and carry on. All that we have achieved by this code branch is to throw away anything we found in the EachEntityDef loop before finding the definition, while we'll keep anything that happens to come after it.
So far as I can see the on_def variable is now quite useless.
I don't think that was the intention; or if it was, then it could surely be more clearly expressed.
I'll try to test this out and figure out the right behavior as well.