(getter, cm, options, then)
| 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. |
no outgoing calls
no test coverage detected