Show More
@@ -574,6 +574,11 b' var IPython = (function (IPython) {' | |||||
574 | // index = cell index or undefined to insert below selected |
|
574 | // index = cell index or undefined to insert below selected | |
575 | index = this.index_or_selected(index); |
|
575 | index = this.index_or_selected(index); | |
576 | var cell = null; |
|
576 | var cell = null; | |
|
577 | // This is intentionally < rather than <= for the sake of more | |||
|
578 | // sensible behavior in some cases. | |||
|
579 | if (this.undelete_index !== null && index < this.undelete_index) { | |||
|
580 | this.undelete_index = this.undelete_index + 1; | |||
|
581 | } | |||
577 | if (this.ncells() === 0 || this.is_valid_cell_index(index)) { |
|
582 | if (this.ncells() === 0 || this.is_valid_cell_index(index)) { | |
578 | if (type === 'code') { |
|
583 | if (type === 'code') { | |
579 | cell = new IPython.CodeCell(this.kernel); |
|
584 | cell = new IPython.CodeCell(this.kernel); | |
@@ -608,6 +613,9 b' var IPython = (function (IPython) {' | |||||
608 | // index = cell index or undefined to insert above selected |
|
613 | // index = cell index or undefined to insert above selected | |
609 | index = this.index_or_selected(index); |
|
614 | index = this.index_or_selected(index); | |
610 | var cell = null; |
|
615 | var cell = null; | |
|
616 | if (this.undelete_index !== null && index <= this.undelete_index) { | |||
|
617 | this.undelete_index = this.undelete_index + 1; | |||
|
618 | } | |||
611 | if (this.ncells() === 0 || this.is_valid_cell_index(index)) { |
|
619 | if (this.ncells() === 0 || this.is_valid_cell_index(index)) { | |
612 | if (type === 'code') { |
|
620 | if (type === 'code') { | |
613 | cell = new IPython.CodeCell(this.kernel); |
|
621 | cell = new IPython.CodeCell(this.kernel); |
General Comments 0
You need to be logged in to leave comments.
Login now