tern icon indicating copy to clipboard operation
tern copied to clipboard

Proposals with same names but different origins can be ignored

Open mrennie opened this issue 9 years ago • 0 comments

If you have two plugins that return a similarly named proposal, the one that was inferred or loaded first (from a definition file) is the only one that is returned, see line 795 onward in tern.js:

for (var prop in srv.cx.props) gather(prop, srv.cx.props[prop][0], 0);

That loop should walk all of the entries in srv.cx.props[prop] and gather them all if they come from different origins (and we are asking for origin information).

See Eclipse Orion bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=496955 for a concrete example. I'll open a pull request for how we fixed the problem in Orion.

mrennie avatar Jun 29 '16 18:06 mrennie