Show More
@@ -267,6 +267,9 b' var IPython = (function (IPython) {' | |||||
267 | if (data.cell_type === 'code') { |
|
267 | if (data.cell_type === 'code') { | |
268 | if (data.input !== undefined) { |
|
268 | if (data.input !== undefined) { | |
269 | this.set_text(data.input); |
|
269 | this.set_text(data.input); | |
|
270 | // make this value the starting point, so that we can only undo | |||
|
271 | // to this state, instead of a blank cell | |||
|
272 | this.code_mirror.clearHistory(); | |||
270 | } |
|
273 | } | |
271 | if (data.prompt_number !== undefined) { |
|
274 | if (data.prompt_number !== undefined) { | |
272 | this.set_input_prompt(data.prompt_number); |
|
275 | this.set_input_prompt(data.prompt_number); |
@@ -602,6 +602,9 b' var IPython = (function (IPython) {' | |||||
602 | text = ''; |
|
602 | text = ''; | |
603 | } |
|
603 | } | |
604 | target_cell.set_text(text); |
|
604 | target_cell.set_text(text); | |
|
605 | // make this value the starting point, so that we can only undo | |||
|
606 | // to this state, instead of a blank cell | |||
|
607 | target_cell.code_mirror.clearHistory(); | |||
605 | source_element.remove(); |
|
608 | source_element.remove(); | |
606 | this.dirty = true; |
|
609 | this.dirty = true; | |
607 | }; |
|
610 | }; | |
@@ -623,6 +626,9 b' var IPython = (function (IPython) {' | |||||
623 | // The edit must come before the set_text. |
|
626 | // The edit must come before the set_text. | |
624 | target_cell.edit(); |
|
627 | target_cell.edit(); | |
625 | target_cell.set_text(text); |
|
628 | target_cell.set_text(text); | |
|
629 | // make this value the starting point, so that we can only undo | |||
|
630 | // to this state, instead of a blank cell | |||
|
631 | target_cell.code_mirror.clearHistory(); | |||
626 | source_element.remove(); |
|
632 | source_element.remove(); | |
627 | this.dirty = true; |
|
633 | this.dirty = true; | |
628 | }; |
|
634 | }; | |
@@ -645,6 +651,9 b' var IPython = (function (IPython) {' | |||||
645 | // The edit must come before the set_text. |
|
651 | // The edit must come before the set_text. | |
646 | target_cell.edit(); |
|
652 | target_cell.edit(); | |
647 | target_cell.set_text(text); |
|
653 | target_cell.set_text(text); | |
|
654 | // make this value the starting point, so that we can only undo | |||
|
655 | // to this state, instead of a blank cell | |||
|
656 | target_cell.code_mirror.clearHistory(); | |||
648 | source_element.remove(); |
|
657 | source_element.remove(); | |
649 | this.dirty = true; |
|
658 | this.dirty = true; | |
650 | }; |
|
659 | }; | |
@@ -667,6 +676,9 b' var IPython = (function (IPython) {' | |||||
667 | // The edit must come before the set_text. |
|
676 | // The edit must come before the set_text. | |
668 | target_cell.edit(); |
|
677 | target_cell.edit(); | |
669 | target_cell.set_text(text); |
|
678 | target_cell.set_text(text); | |
|
679 | // make this value the starting point, so that we can only undo | |||
|
680 | // to this state, instead of a blank cell | |||
|
681 | target_cell.code_mirror.clearHistory(); | |||
670 | source_element.remove(); |
|
682 | source_element.remove(); | |
671 | this.dirty = true; |
|
683 | this.dirty = true; | |
672 | }; |
|
684 | }; | |
@@ -693,6 +705,9 b' var IPython = (function (IPython) {' | |||||
693 | target_cell.set_level(level); |
|
705 | target_cell.set_level(level); | |
694 | target_cell.edit(); |
|
706 | target_cell.edit(); | |
695 | target_cell.set_text(text); |
|
707 | target_cell.set_text(text); | |
|
708 | // make this value the starting point, so that we can only undo | |||
|
709 | // to this state, instead of a blank cell | |||
|
710 | target_cell.code_mirror.clearHistory(); | |||
696 | source_element.remove(); |
|
711 | source_element.remove(); | |
697 | this.dirty = true; |
|
712 | this.dirty = true; | |
698 | }; |
|
713 | }; |
@@ -158,6 +158,9 b' var IPython = (function (IPython) {' | |||||
158 | if (data.cell_type === this.cell_type) { |
|
158 | if (data.cell_type === this.cell_type) { | |
159 | if (data.source !== undefined) { |
|
159 | if (data.source !== undefined) { | |
160 | this.set_text(data.source); |
|
160 | this.set_text(data.source); | |
|
161 | // make this value the starting point, so that we can only undo | |||
|
162 | // to this state, instead of a blank cell | |||
|
163 | this.code_mirror.clearHistory(); | |||
161 | this.set_rendered(data.rendered || ''); |
|
164 | this.set_rendered(data.rendered || ''); | |
162 | this.rendered = false; |
|
165 | this.rendered = false; | |
163 | this.render(); |
|
166 | this.render(); |
General Comments 0
You need to be logged in to leave comments.
Login now