MCPcopy Create free account
hub / github.com/TruthHun/BookStack / retrieveHints

Function retrieveHints

static/editor.md/lib/codemirror/addon/hint/show-hint.js:28–37  ·  view source on GitHub ↗
(getter, cm, options, then)

Source from the content-addressed store, hash-verified

26
27 var asyncRunID = 0;
28 function retrieveHints(getter, cm, options, then) {
29 if (getter.async) {
30 var id = ++asyncRunID;
31 getter(cm, function(hints) {
32 if (asyncRunID == id) then(hints);
33 }, options);
34 } else {
35 then(getter(cm, options));
36 }
37 }
38
39 CodeMirror.defineExtension("showHint", function(options) {
40 // We want a single cursor position.

Callers 2

show-hint.jsFile · 0.85
updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected