|
|
|
|
@ -323,9 +323,10 @@ define([
|
|
|
|
|
|
|
|
|
|
Completer.prototype.keydown = function (event) {
|
|
|
|
|
var code = event.keyCode;
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
|
|
// Enter
|
|
|
|
|
var options;
|
|
|
|
|
var index;
|
|
|
|
|
if (code == keycodes.enter) {
|
|
|
|
|
event.codemirrorIgnore = true;
|
|
|
|
|
event._ipkmIgnore = true;
|
|
|
|
|
@ -343,14 +344,11 @@ define([
|
|
|
|
|
// like %pylab , pylab have no shred start, and ff will result in py<tab><tab>
|
|
|
|
|
// to erase py
|
|
|
|
|
var sh = shared_start(this.raw_result, true);
|
|
|
|
|
if (sh) {
|
|
|
|
|
if (sh.str !== '') {
|
|
|
|
|
this.insert(sh);
|
|
|
|
|
}
|
|
|
|
|
this.close();
|
|
|
|
|
//reinvoke self
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
that.carry_on_completion();
|
|
|
|
|
}, 50);
|
|
|
|
|
this.carry_on_completion();
|
|
|
|
|
} else if (code == keycodes.up || code == keycodes.down) {
|
|
|
|
|
// need to do that to be able to move the arrow
|
|
|
|
|
// when on the first or last line ofo a code cell
|
|
|
|
|
@ -358,8 +356,8 @@ define([
|
|
|
|
|
event._ipkmIgnore = true;
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
|
|
var options = this.sel.find('option');
|
|
|
|
|
var index = this.sel[0].selectedIndex;
|
|
|
|
|
options = this.sel.find('option');
|
|
|
|
|
index = this.sel[0].selectedIndex;
|
|
|
|
|
if (code == keycodes.up) {
|
|
|
|
|
index--;
|
|
|
|
|
}
|
|
|
|
|
@ -371,8 +369,8 @@ define([
|
|
|
|
|
} else if (code == keycodes.pageup || code == keycodes.pagedown) {
|
|
|
|
|
event._ipkmIgnore = true;
|
|
|
|
|
|
|
|
|
|
var options = this.sel.find('option');
|
|
|
|
|
var index = this.sel[0].selectedIndex;
|
|
|
|
|
options = this.sel.find('option');
|
|
|
|
|
index = this.sel[0].selectedIndex;
|
|
|
|
|
if (code == keycodes.pageup) {
|
|
|
|
|
index -= 10; // As 10 is the hard coded size of the drop down menu
|
|
|
|
|
} else {
|
|
|
|
|
|