Sublime Forum

Goto Symbol broken for JS/Coffee?

#1

Since 3157, Goto Symbol seems pretty messed up for JS.

No match:

Wrong match:

Just… wrong:

Doesn’t seem to be a problem for Goto Symbol in Project. Doesn’t seem to be a problem for other languages, either, after a very cursory investigation.

Anybody else? 3156 was fine.

TRL

0 Likes

Dev Build 3157 and JS Go To showing weird results
#2

Your example contains a syntax error. The following is invalid:

Foo.prototype.fullyContrivedAndBorked (ok) {
    return 22;
}

The syntax will not recognize this as a function declaration and it will not be found in the symbol table. You probably want:

Foo.prototype.fullyContrivedAndBorked = function (ok) {
    return 22;
}

The third example does seem to be a bug. The meta.function.declaration.js scope is appearing where it shouldn’t. I should have a fix out today or tomorrow.

0 Likes

#3

Oops, yup. Copy-paste-in-haste, that was. With the syntax corrected, you can see the real problem – a minimal version of what’s going on in example 3, where the “symbol” seems to match multiple entire function declarations.

Thanks much, Mr. Smith.

0 Likes

#4

Already merged!

1 Like