Merge pull request #4378 from minrk/split-below

split adds new cell above, rather than below
Paul Ivanov 12 years ago
commit 8b26933af5

@ -1163,16 +1163,18 @@ var IPython = (function (IPython) {
var texta = cell.get_pre_cursor();
var textb = cell.get_post_cursor();
if (cell instanceof IPython.CodeCell) {
cell.set_text(texta);
var new_cell = this.insert_cell_below('code');
new_cell.set_text(textb);
cell.set_text(textb);
var new_cell = this.insert_cell_above('code');
new_cell.set_text(texta);
this.select_next();
} else if (cell instanceof IPython.MarkdownCell) {
cell.set_text(texta);
cell.set_text(textb);
cell.render();
var new_cell = this.insert_cell_below('markdown');
var new_cell = this.insert_cell_above('markdown');
new_cell.edit(); // editor must be visible to call set_text
new_cell.set_text(textb);
new_cell.set_text(texta);
new_cell.render();
this.select_next();
}
};
};

Loading…
Cancel
Save