Turn on preferPrefixMatches for JS code hints.

Adding this option to string matching provides a fix for #3534 by putting
the matches at the same score and using the scope as a tie breaker.
This commit is contained in:
Kevin Dangoor committed 2013-04-24 10:16:19 -04:00
1 parent fca72ea58b
commit 232ee9bb0e
1 file changed
+3 -1
@@ -237,7 +237,9 @@ define(function (require, exports, module) {
scopeResponse.promise.done(function () {
cachedLine = cursor.line;
cachedType = session.getType();
matcher = new StringMatch.StringMatcher();
matcher = new StringMatch.StringMatcher({
preferPrefixMatches: true
});
cachedHints = session.getHints(query, matcher);
if ($deferredHints.state() === "pending") {