##// END OF EJS Templates
Check down too.
Jonathan Frederic -
Show More
@@ -163,13 +163,15 var IPython = (function (IPython) {
163 163 help_index : '',
164 164 handler : function (event) {
165 165 var index = IPython.notebook.get_selected_index();
166 var cell = IPython.notebook.get_selected_cell();
167 if (index !== 0 && cell && cell.at_top()) {
168 event.preventDefault();
169 IPython.notebook.command_mode();
170 IPython.notebook.select_prev();
171 IPython.notebook.edit_mode();
172 return false;
166 var cell = IPython.notebook.get_cell(index);
167 if (index !== null && index !== 0) {
168 if (cell && cell.at_top()) {
169 event.preventDefault();
170 IPython.notebook.command_mode();
171 IPython.notebook.select_prev();
172 IPython.notebook.edit_mode();
173 return false;
174 }
173 175 }
174 176 }
175 177 },
@@ -177,13 +179,16 var IPython = (function (IPython) {
177 179 help : '',
178 180 help_index : '',
179 181 handler : function (event) {
180 var cell = IPython.notebook.get_selected_cell();
181 if (cell && cell.at_bottom()) {
182 event.preventDefault();
183 IPython.notebook.command_mode();
184 IPython.notebook.select_next();
185 IPython.notebook.edit_mode();
186 return false;
182 var index = IPython.notebook.get_selected_index();
183 var cell = IPython.notebook.get_cell(index);
184 if (index !== null && index !== (IPython.notebook.ncells()-1)) {
185 if (cell && cell.at_bottom()) {
186 event.preventDefault();
187 IPython.notebook.command_mode();
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