Show More
@@ -368,14 +368,6 var IPython = (function (IPython) { | |||||
368 | return false; |
|
368 | return false; | |
369 | }; |
|
369 | }; | |
370 |
|
370 | |||
371 | CodeCell.prototype.command_mode = function () { |
|
|||
372 | var cont = IPython.Cell.prototype.command_mode.apply(this); |
|
|||
373 | if (cont) { |
|
|||
374 | this.focus_cell(); |
|
|||
375 | }; |
|
|||
376 | return cont; |
|
|||
377 | } |
|
|||
378 |
|
||||
379 | CodeCell.prototype.edit_mode = function () { |
|
371 | CodeCell.prototype.edit_mode = function () { | |
380 | var cont = IPython.Cell.prototype.edit_mode.apply(this); |
|
372 | var cont = IPython.Cell.prototype.edit_mode.apply(this); | |
381 | if (cont) { |
|
373 | if (cont) { |
@@ -131,6 +131,7 var IPython = (function (IPython) { | |||||
131 | help : 'command mode', |
|
131 | help : 'command mode', | |
132 | handler : function (event) { |
|
132 | handler : function (event) { | |
133 | IPython.notebook.command_mode(); |
|
133 | IPython.notebook.command_mode(); | |
|
134 | IPython.notebook.focus_cell(); | |||
134 | return false; |
|
135 | return false; | |
135 | } |
|
136 | } | |
136 | }, |
|
137 | }, | |
@@ -138,6 +139,7 var IPython = (function (IPython) { | |||||
138 | help : 'command mode', |
|
139 | help : 'command mode', | |
139 | handler : function (event) { |
|
140 | handler : function (event) { | |
140 | IPython.notebook.command_mode(); |
|
141 | IPython.notebook.command_mode(); | |
|
142 | IPython.notebook.focus_cell(); | |||
141 | return false; |
|
143 | return false; | |
142 | } |
|
144 | } | |
143 | }, |
|
145 | }, |
@@ -547,6 +547,11 var IPython = (function (IPython) { | |||||
547 | }; |
|
547 | }; | |
548 | }; |
|
548 | }; | |
549 |
|
549 | |||
|
550 | Notebook.prototype.focus_cell = function () { | |||
|
551 | var cell = this.get_selected_cell(); | |||
|
552 | if (cell === null) {return;} // No cell is selected | |||
|
553 | cell.focus_cell(); | |||
|
554 | }; | |||
550 |
|
555 | |||
551 | // Cell movement |
|
556 | // Cell movement | |
552 |
|
557 |
@@ -204,14 +204,6 var IPython = (function (IPython) { | |||||
204 | this.render(); |
|
204 | this.render(); | |
205 | }; |
|
205 | }; | |
206 |
|
206 | |||
207 | TextCell.prototype.command_mode = function () { |
|
|||
208 | var cont = IPython.Cell.prototype.command_mode.apply(this); |
|
|||
209 | if (cont) { |
|
|||
210 | this.focus_cell(); |
|
|||
211 | }; |
|
|||
212 | return cont; |
|
|||
213 | } |
|
|||
214 |
|
||||
215 | TextCell.prototype.edit_mode = function () { |
|
207 | TextCell.prototype.edit_mode = function () { | |
216 | var cont = IPython.Cell.prototype.edit_mode.apply(this); |
|
208 | var cont = IPython.Cell.prototype.edit_mode.apply(this); | |
217 | if (cont) { |
|
209 | if (cont) { |
General Comments 0
You need to be logged in to leave comments.
Login now