Fix hinting so it always works in an HTML file.

We were not creating a Session if the language of the selection was not javascript.  So when opening an html file, if the cursor wasn't in a javascript section, we would get no hints.
This commit is contained in:
Erik Tierney committed 2013-05-13 16:51:51 -04:00
1 parent 589dcb0719
commit 3bc2bd8bd8
2 files changed
+1 -15

No files matched your search

@@ -470,12 +470,8 @@ define(function (require, exports, module) {
cachedHints = null;
cachedType = null;
if (editor && editor.getLanguageForSelection().getId() === HintUtils.LANGUAGE_ID) {
if (editor) {
initializeSession(editor, true);
$(editor)
.on(HintUtils.eventName("change"), function () {
ScopeManager.handleFileChange(editor.document);
});
} else {
session = null;
}