##// END OF EJS Templates
fix for #1678, undo no longer clears cells...
Paul Ivanov -
Show More
@@ -267,6 +267,9 var IPython = (function (IPython) {
267 267 if (data.cell_type === 'code') {
268 268 if (data.input !== undefined) {
269 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 274 if (data.prompt_number !== undefined) {
272 275 this.set_input_prompt(data.prompt_number);
@@ -602,6 +602,9 var IPython = (function (IPython) {
602 602 text = '';
603 603 }
604 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 608 source_element.remove();
606 609 this.dirty = true;
607 610 };
@@ -623,6 +626,9 var IPython = (function (IPython) {
623 626 // The edit must come before the set_text.
624 627 target_cell.edit();
625 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 632 source_element.remove();
627 633 this.dirty = true;
628 634 };
@@ -645,6 +651,9 var IPython = (function (IPython) {
645 651 // The edit must come before the set_text.
646 652 target_cell.edit();
647 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 657 source_element.remove();
649 658 this.dirty = true;
650 659 };
@@ -667,6 +676,9 var IPython = (function (IPython) {
667 676 // The edit must come before the set_text.
668 677 target_cell.edit();
669 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 682 source_element.remove();
671 683 this.dirty = true;
672 684 };
@@ -693,6 +705,9 var IPython = (function (IPython) {
693 705 target_cell.set_level(level);
694 706 target_cell.edit();
695 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 711 source_element.remove();
697 712 this.dirty = true;
698 713 };
@@ -158,6 +158,9 var IPython = (function (IPython) {
158 158 if (data.cell_type === this.cell_type) {
159 159 if (data.source !== undefined) {
160 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 164 this.set_rendered(data.rendered || '');
162 165 this.rendered = false;
163 166 this.render();
General Comments 0
You need to be logged in to leave comments. Login now