Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #11123 from adobe/marcel/js-hints-perf-min
Browse files Browse the repository at this point in the history
Improve JS Code Hints performance in minified files
  • Loading branch information
nethip committed Sep 9, 2015
2 parents 81925ce + d29288a commit e79fb4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/extensions/default/JavaScriptCodeHints/Session.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ define(function (require, exports, module) {
"use strict";

var StringMatch = brackets.getModule("utils/StringMatch"),
TokenUtils = brackets.getModule("utils/TokenUtils"),
LanguageManager = brackets.getModule("language/LanguageManager"),
HTMLUtils = brackets.getModule("language/HTMLUtils"),
HintUtils = require("HintUtils"),
Expand Down Expand Up @@ -130,9 +131,9 @@ define(function (require, exports, module) {
var cm = this.editor._codeMirror;

if (cursor) {
return cm.getTokenAt(cursor);
return TokenUtils.getTokenAt(cm, cursor);
} else {
return cm.getTokenAt(this.getCursor());
return TokenUtils.getTokenAt(cm, this.getCursor());
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/utils/TokenUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ define(function (require, exports, module) {
cm: cm,
line: line,
timeStamp: Date.now(),
tokens: tokens,
tokens: tokens
};
cm.off("changes", _clearCache);
cm.on("changes", _clearCache);
Expand Down

0 comments on commit e79fb4a

Please sign in to comment.