only record document changes for non-null keys

This commit is contained in:
dloverin committed 2013-05-31 12:51:35 -04:00
1 parent 8c9709ac6d
commit 264fc311e4
1 file changed
+5 -2
@@ -378,8 +378,11 @@ define(function (require, exports, module) {
// Compute fresh hints if none exist, or if the session
// type has changed since the last hint computation
if (this.needNewHints(session)) {
ScopeManager.handleFileChange({from: cursor, to: cursor, text: [key]});
ignoreChange = true;
if (key) {
ScopeManager.handleFileChange({from: cursor, to: cursor, text: [key]});
ignoreChange = true;
}
var scopeResponse = ScopeManager.requestHints(session, session.editor.document);
if (scopeResponse.hasOwnProperty("promise")) {