Skip to content
Snippets Groups Projects
Commit 6f1ce2a8 authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[tern addon] Make argument hint caching actually work

Closes #3934
parent 3265e11e
No related branches found
No related tags found
No related merge requests found
......@@ -179,7 +179,7 @@
var data = findDoc(ts, doc);
var argHints = ts.cachedArgHints;
if (argHints && argHints.doc == doc && cmpPos(argHints.start, change.to) <= 0)
if (argHints && argHints.doc == doc && cmpPos(argHints.start, change.to) >= 0)
ts.cachedArgHints = null;
var changed = data.changed;
......@@ -306,7 +306,7 @@
ts.request(cm, {type: "type", preferFunction: true, end: start}, function(error, data) {
if (error || !data.type || !(/^fn\(/).test(data.type)) return;
ts.cachedArgHints = {
start: pos,
start: start,
type: parseFnType(data.type),
name: data.exprName || data.name || "fn",
guess: data.guess,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment