fix bug where hints disappear on first character

This commit is contained in:
dloverin committed 2013-03-28 16:21:24 -04:00
1 parent 7bfaedfa0a
commit 7ac5459e6a
3 files changed
+7 -5

No files matched your search

@@ -311,7 +311,7 @@ define(function (require, exports, module) {
type.property !== cachedType.property ||
type.context !== cachedType.context ||
query.length == 0 ||
(cachedHints.length = 0 && query.length == 2)) { // FIXME: length of 2 is special because that is when tern starts guessing
(cachedHints.length == 0 && query.length == 2)) { // FIXME: length of 2 is special because that is when tern starts guessing
var offset = session.getOffset(),
scopeResponse = ScopeManager.getScopeInfo(session, session.editor.document, offset),
self = this;
@@ -351,8 +351,7 @@ define(function (require, exports, module) {
// Compute fresh hints if none exist, or if the session
// type has changed since the last hint computation
if (!cachedHints ||
type.property !== cachedType.property ||
if (type.property !== cachedType.property ||
type.context !== cachedType.context) {
cachedType = type;
cachedHints = session.getHints();