Making completer.js independent of IPython.notebook.

pull/37/head
Brian E. Granger 13 years ago
parent e5d355dfd1
commit 0d94e67a47

@ -67,18 +67,16 @@ var IPython = (function (IPython) {
var Completer = function (cell) {
this.editor = cell.code_mirror;
var that = this;
$([IPython.events]).on('status_busy.Kernel', function () {
that.skip_kernel_completion = true;
});
$([IPython.events]).on('status_idle.Kernel', function () {
that.skip_kernel_completion = false;
});
};
this.cell = cell;
this.editor = cell.code_mirror;
var that = this;
$([IPython.events]).on('status_busy.Kernel', function () {
that.skip_kernel_completion = true;
});
$([IPython.events]).on('status_idle.Kernel', function () {
that.skip_kernel_completion = false;
});
};
Completer.prototype.startCompletion = function () {
@ -128,7 +126,7 @@ var IPython = (function (IPython) {
var callbacks = {
'complete_reply': $.proxy(this.finish_completing, this)
};
IPython.notebook.kernel.complete(line, cur.ch, callbacks);
this.cell.kernel.complete(line, cur.ch, callbacks);
}
};

Loading…
Cancel
Save