Skip to content
This repository was archived by the owner on Apr 16, 2026. It is now read-only.

Commit b6f9fd3

Browse files
Matt Gaidemarijnh
authored andcommitted
[tern addon] Add option for hint delay
1 parent b1df2f0 commit b6f9fd3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

addon/tern/tern.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
child.target = "_blank";
267267
}
268268
}
269-
tempTooltip(cm, tip);
269+
tempTooltip(cm, tip, ts);
270270
if (c) c();
271271
}, pos);
272272
}
@@ -592,7 +592,7 @@
592592

593593
// Tooltips
594594

595-
function tempTooltip(cm, content) {
595+
function tempTooltip(cm, content, ts) {
596596
if (cm.state.ternTooltip) remove(cm.state.ternTooltip);
597597
var where = cm.cursorCoords();
598598
var tip = cm.state.ternTooltip = makeTooltip(where.right + 1, where.bottom, content);
@@ -616,7 +616,7 @@
616616
else mouseOnTip = false;
617617
}
618618
});
619-
setTimeout(maybeClear, cm.options.ternHintDelay ? cm.options.ternHintDelay : 1700);
619+
setTimeout(maybeClear, ts.options.hintDelay ? ts.options.hintDelay : 1700);
620620
cm.on("cursorActivity", clear);
621621
cm.on('blur', clear);
622622
cm.on('scroll', clear);
@@ -644,7 +644,7 @@
644644
if (ts.options.showError)
645645
ts.options.showError(cm, msg);
646646
else
647-
tempTooltip(cm, String(msg));
647+
tempTooltip(cm, String(msg), ts);
648648
}
649649

650650
function closeArgHints(ts) {

0 commit comments

Comments
 (0)