()
| 101 | var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout; |
| 102 | |
| 103 | function done() { |
| 104 | if (finished) return; |
| 105 | finished = true; |
| 106 | completion.close(); |
| 107 | completion.cm.off("cursorActivity", activity); |
| 108 | if (data) CodeMirror.signal(data, "close"); |
| 109 | } |
| 110 | |
| 111 | function update() { |
| 112 | if (finished) return; |