Don't hint on function, parameter, or variable declarations.
no hints for
var fo// we used to pop up hints here
This commit is contained in:
Erik Tierney committed 2013-05-10 16:00:16 -04:00
1 parent 03d0c0766f
commit dfdff356a6
4 files changed
+35 -1

No files matched your search

@@ -532,5 +532,19 @@ define(function (require, exports, module) {
}
};
/**
* Deterimine if the cursor is located in the name of a function declaration.
* This is so we can suppress hints when in a funtion name, as we do for variable and
* parameter declarations, but we can tell those from the token itself rather than having
* to look at previous tokens.
*/
Session.prototype.isFunctionName = function () {
var cursor = this.getCursor(),
token = this.getToken(cursor),
prevToken = this._getPreviousToken(cursor);
return prevToken.string === "function";
};
module.exports = Session;
});