Show More
@@ -264,6 +264,8 b' var IPython = (function (IPython) {' | |||||
264 | }; |
|
264 | }; | |
265 |
|
265 | |||
266 | // As you type completer |
|
266 | // As you type completer | |
|
267 | // this should be called by the completer, that in return will | |||
|
268 | // be reclled by finish_completing | |||
267 | CodeCell.prototype.requestCompletion= function(callback) |
|
269 | CodeCell.prototype.requestCompletion= function(callback) | |
268 | { |
|
270 | { | |
269 | this._compcallback = callback; |
|
271 | this._compcallback = callback; | |
@@ -274,9 +276,14 b' var IPython = (function (IPython) {' | |||||
274 | var line = this.code_mirror.getLine(cur.line); |
|
276 | var line = this.code_mirror.getLine(cur.line); | |
275 | this.is_completing = true; |
|
277 | this.is_completing = true; | |
276 | this.completion_cursor = cur; |
|
278 | this.completion_cursor = cur; | |
|
279 | // one could fork here and directly call finish completing | |||
|
280 | // if kernel is busy | |||
277 | IPython.notebook.complete_cell(this, line, cur.ch); |
|
281 | IPython.notebook.complete_cell(this, line, cur.ch); | |
278 | } |
|
282 | } | |
279 |
|
283 | |||
|
284 | // called when completion came back from the kernel. this will inspect the | |||
|
285 | // curent cell for (more) completion merge the resuults with the ones | |||
|
286 | // comming from the kernel and forward it to the completer | |||
280 | CodeCell.prototype.finish_completing = function (matched_text, matches) { |
|
287 | CodeCell.prototype.finish_completing = function (matched_text, matches) { | |
281 | // let's build a function that wrap all that stuff into what is needed for the |
|
288 | // let's build a function that wrap all that stuff into what is needed for the | |
282 | // new completer: |
|
289 | // new completer: |
General Comments 0
You need to be logged in to leave comments.
Login now