Show More
@@ -163,13 +163,15 b' var IPython = (function (IPython) {' | |||||
163 | help_index : '', |
|
163 | help_index : '', | |
164 | handler : function (event) { |
|
164 | handler : function (event) { | |
165 | var index = IPython.notebook.get_selected_index(); |
|
165 | var index = IPython.notebook.get_selected_index(); | |
166 |
var cell = IPython.notebook.get_ |
|
166 | var cell = IPython.notebook.get_cell(index); | |
167 |
if (index !== |
|
167 | if (index !== null && index !== 0) { | |
168 | event.preventDefault(); |
|
168 | if (cell && cell.at_top()) { | |
169 | IPython.notebook.command_mode(); |
|
169 | event.preventDefault(); | |
170 |
IPython.notebook. |
|
170 | IPython.notebook.command_mode(); | |
171 |
IPython.notebook. |
|
171 | IPython.notebook.select_prev(); | |
172 | return false; |
|
172 | IPython.notebook.edit_mode(); | |
|
173 | return false; | |||
|
174 | } | |||
173 | } |
|
175 | } | |
174 | } |
|
176 | } | |
175 | }, |
|
177 | }, | |
@@ -177,13 +179,16 b' var IPython = (function (IPython) {' | |||||
177 | help : '', |
|
179 | help : '', | |
178 | help_index : '', |
|
180 | help_index : '', | |
179 | handler : function (event) { |
|
181 | handler : function (event) { | |
180 |
var |
|
182 | var index = IPython.notebook.get_selected_index(); | |
181 | if (cell && cell.at_bottom()) { |
|
183 | var cell = IPython.notebook.get_cell(index); | |
182 | event.preventDefault(); |
|
184 | if (index !== null && index !== (IPython.notebook.ncells()-1)) { | |
183 | IPython.notebook.command_mode(); |
|
185 | if (cell && cell.at_bottom()) { | |
184 | IPython.notebook.select_next(); |
|
186 | event.preventDefault(); | |
185 |
IPython.notebook. |
|
187 | IPython.notebook.command_mode(); | |
186 | return false; |
|
188 | IPython.notebook.select_next(); | |
|
189 | IPython.notebook.edit_mode(); | |||
|
190 | return false; | |||
|
191 | } | |||
187 | } |
|
192 | } | |
188 | } |
|
193 | } | |
189 | }, |
|
194 | }, |
General Comments 0
You need to be logged in to leave comments.
Login now