summaryrefslogtreecommitdiff
path: root/public/vendor/codemirror/addon/tern
diff options
context:
space:
mode:
Diffstat (limited to 'public/vendor/codemirror/addon/tern')
-rwxr-xr-xpublic/vendor/codemirror/addon/tern/tern.js6
-rwxr-xr-xpublic/vendor/codemirror/addon/tern/worker.js2
2 files changed, 5 insertions, 3 deletions
diff --git a/public/vendor/codemirror/addon/tern/tern.js b/public/vendor/codemirror/addon/tern/tern.js
index 99b8a646..dfb19b84 100755
--- a/public/vendor/codemirror/addon/tern/tern.js
+++ b/public/vendor/codemirror/addon/tern/tern.js
@@ -59,6 +59,7 @@
this.options = options || {};
var plugins = this.options.plugins || (this.options.plugins = {});
if (!plugins.doc_comment) plugins.doc_comment = true;
+ this.docs = Object.create(null);
if (this.options.useWorker) {
this.server = new WorkerServer(this);
} else {
@@ -69,7 +70,6 @@
plugins: plugins
});
}
- this.docs = Object.create(null);
this.trackChange = function(doc, change) { trackChange(self, doc, change); };
this.cachedArgHints = null;
@@ -124,6 +124,8 @@
var self = this;
var doc = findDoc(this, cm.getDoc());
var request = buildRequest(this, doc, query, pos);
+ var extraOptions = request.query && this.options.queryOptions && this.options.queryOptions[request.query.type]
+ if (extraOptions) for (var prop in extraOptions) request.query[prop] = extraOptions[prop];
this.server.request(request, function (error, data) {
if (!error && self.options.responseFilter)
@@ -442,7 +444,7 @@
function atInterestingExpression(cm) {
var pos = cm.getCursor("end"), tok = cm.getTokenAt(pos);
- if (tok.start < pos.ch && (tok.type == "comment" || tok.type == "string")) return false;
+ if (tok.start < pos.ch && tok.type == "comment") return false;
return /[\w)\]]/.test(cm.getLine(pos.line).slice(Math.max(pos.ch - 1, 0), pos.ch + 1));
}
diff --git a/public/vendor/codemirror/addon/tern/worker.js b/public/vendor/codemirror/addon/tern/worker.js
index 48277af8..887f906a 100755
--- a/public/vendor/codemirror/addon/tern/worker.js
+++ b/public/vendor/codemirror/addon/tern/worker.js
@@ -39,6 +39,6 @@ function startServer(defs, plugins, scripts) {
});
}
-var console = {
+this.console = {
log: function(v) { postMessage({type: "debug", message: v}); }
};