Show More
@@ -167,7 +167,7 b' var IPython = (function (IPython) {' | |||||
167 | event.preventDefault(); |
|
167 | event.preventDefault(); | |
168 | IPython.notebook.command_mode(); |
|
168 | IPython.notebook.command_mode(); | |
169 | IPython.notebook.select_prev(); |
|
169 | IPython.notebook.select_prev(); | |
170 |
IPython.notebook. |
|
170 | IPython.notebook.edit_mode(); | |
171 | return false; |
|
171 | return false; | |
172 | } |
|
172 | } | |
173 | } |
|
173 | } | |
@@ -181,7 +181,7 b' var IPython = (function (IPython) {' | |||||
181 | event.preventDefault(); |
|
181 | event.preventDefault(); | |
182 | IPython.notebook.command_mode(); |
|
182 | IPython.notebook.command_mode(); | |
183 | IPython.notebook.select_next(); |
|
183 | IPython.notebook.select_next(); | |
184 |
IPython.notebook. |
|
184 | IPython.notebook.edit_mode(); | |
185 | return false; |
|
185 | return false; | |
186 | } |
|
186 | } | |
187 | } |
|
187 | } | |
@@ -253,7 +253,7 b' var IPython = (function (IPython) {' | |||||
253 | help : 'edit mode', |
|
253 | help : 'edit mode', | |
254 | help_index : 'aa', |
|
254 | help_index : 'aa', | |
255 | handler : function (event) { |
|
255 | handler : function (event) { | |
256 |
IPython.notebook. |
|
256 | IPython.notebook.edit_mode(); | |
257 | return false; |
|
257 | return false; | |
258 | } |
|
258 | } | |
259 | }, |
|
259 | }, |
@@ -564,11 +564,11 b' var IPython = (function (IPython) {' | |||||
564 | /** |
|
564 | /** | |
565 | * Make a cell enter edit mode. |
|
565 | * Make a cell enter edit mode. | |
566 | * |
|
566 | * | |
567 |
* @method |
|
567 | * @method edit_mode | |
568 | * @param [index] {int} Cell index to select. If no index is provided, |
|
568 | * @param [index] {int} Cell index to select. If no index is provided, | |
569 | * the current selected cell is used. |
|
569 | * the current selected cell is used. | |
570 | **/ |
|
570 | **/ | |
571 |
Notebook.prototype. |
|
571 | Notebook.prototype.edit_mode = function (index) { | |
572 | if (index===undefined) { |
|
572 | if (index===undefined) { | |
573 | index = this.get_selected_index(); |
|
573 | index = this.get_selected_index(); | |
574 | } |
|
574 | } | |
@@ -1468,14 +1468,14 b' var IPython = (function (IPython) {' | |||||
1468 | // If we are at the end always insert a new cell and return |
|
1468 | // If we are at the end always insert a new cell and return | |
1469 | if (cell_index === (this.ncells()-1)) { |
|
1469 | if (cell_index === (this.ncells()-1)) { | |
1470 | this.insert_cell_below('code'); |
|
1470 | this.insert_cell_below('code'); | |
1471 |
this. |
|
1471 | this.edit_mode(cell_index+1); | |
1472 | this.scroll_to_bottom(); |
|
1472 | this.scroll_to_bottom(); | |
1473 | this.set_dirty(true); |
|
1473 | this.set_dirty(true); | |
1474 | return; |
|
1474 | return; | |
1475 | } |
|
1475 | } | |
1476 |
|
1476 | |||
1477 | this.insert_cell_below('code'); |
|
1477 | this.insert_cell_below('code'); | |
1478 |
this. |
|
1478 | this.edit_mode(cell_index+1); | |
1479 | this.set_dirty(true); |
|
1479 | this.set_dirty(true); | |
1480 | }; |
|
1480 | }; | |
1481 |
|
1481 | |||
@@ -1494,7 +1494,7 b' var IPython = (function (IPython) {' | |||||
1494 | // If we are at the end always insert a new cell and return |
|
1494 | // If we are at the end always insert a new cell and return | |
1495 | if (cell_index === (this.ncells()-1)) { |
|
1495 | if (cell_index === (this.ncells()-1)) { | |
1496 | this.insert_cell_below('code'); |
|
1496 | this.insert_cell_below('code'); | |
1497 |
this. |
|
1497 | this.edit_mode(cell_index+1); | |
1498 | this.scroll_to_bottom(); |
|
1498 | this.scroll_to_bottom(); | |
1499 | this.set_dirty(true); |
|
1499 | this.set_dirty(true); | |
1500 | return; |
|
1500 | return; | |
@@ -1969,7 +1969,7 b' var IPython = (function (IPython) {' | |||||
1969 | this.fromJSON(data); |
|
1969 | this.fromJSON(data); | |
1970 | if (this.ncells() === 0) { |
|
1970 | if (this.ncells() === 0) { | |
1971 | this.insert_cell_below('code'); |
|
1971 | this.insert_cell_below('code'); | |
1972 |
this. |
|
1972 | this.edit_mode(0); | |
1973 | } else { |
|
1973 | } else { | |
1974 | this.select(0); |
|
1974 | this.select(0); | |
1975 | this.command_mode(); |
|
1975 | this.command_mode(); |
General Comments 0
You need to be logged in to leave comments.
Login now