prompt '*' strore fix + tab remove tooltip

tab was not cancelling tooltip bringing to cases where you could have
tooltip andcompleter open.

Do not store '*' when serializing cells.
This commit is contained in:
Matthias BUSSONNIER 2013-11-08 16:43:51 +01:00
parent 2c3f0eddb0
commit 5db9624d44

View File

@ -202,8 +202,10 @@ var IPython = (function (IPython) {
return true;
} else if (event.keyCode === key.TAB && event.type == 'keydown') {
// Tab completion.
//Do not trim here because of tooltip
if (editor.somethingSelected()) { return false; }
IPython.tooltip.remove_and_cancel_tooltip();
if (editor.somethingSelected()) {
return false;
}
var pre_cursor = editor.getRange({line:cur.line,ch:0},cur);
if (pre_cursor.trim() === "") {
// Don't autocomplete if the part of the line before the cursor
@ -443,7 +445,8 @@ var IPython = (function (IPython) {
var data = IPython.Cell.prototype.toJSON.apply(this);
data.input = this.get_text();
data.cell_type = 'code';
if (this.input_prompt_number) {
// is finite protect against undefined and '*' value
if (isFinite(this.input_prompt_number)) {
data.prompt_number = this.input_prompt_number;
}
var outputs = this.output_area.toJSON();