Show More
@@ -283,9 +283,8 var IPython = (function (IPython) { | |||
|
283 | 283 | var cursor = cm.getCursor(); |
|
284 | 284 | if (cursor.line === 0 && cursor.ch === 0) { |
|
285 | 285 | return true; |
|
286 | } else { | |
|
287 | return false; | |
|
288 | 286 | } |
|
287 | return false; | |
|
289 | 288 | }; |
|
290 | 289 | |
|
291 | 290 | /** |
@@ -297,10 +296,10 var IPython = (function (IPython) { | |||
|
297 | 296 | var cursor = cm.getCursor(); |
|
298 | 297 | if (cursor.line === (cm.lineCount()-1) && cursor.ch === cm.getLine(cursor.line).length) { |
|
299 | 298 | return true; |
|
300 | } else { | |
|
301 | return false; | |
|
302 | 299 | } |
|
300 | return false; | |
|
303 | 301 | }; |
|
302 | ||
|
304 | 303 | /** |
|
305 | 304 | * enter the command mode for the cell |
|
306 | 305 | * @method command_mode |
@@ -108,8 +108,7 var IPython = (function (IPython) { | |||
|
108 | 108 | IPython.notebook.select_prev(); |
|
109 | 109 | IPython.notebook.edit_mode(); |
|
110 | 110 | var cm = IPython.notebook.get_selected_cell().code_mirror; |
|
111 | var prev_cursor = cell.code_mirror.getCursor(); | |
|
112 | cm.setCursor(cm.lastLine(), prev_cursor.ch) | |
|
111 | cm.setCursor(cm.lastLine(), 0); | |
|
113 | 112 | return false; |
|
114 | 113 | } else if (cell) { |
|
115 | 114 | var cm = cell.code_mirror; |
@@ -134,8 +133,7 var IPython = (function (IPython) { | |||
|
134 | 133 | IPython.notebook.select_next(); |
|
135 | 134 | IPython.notebook.edit_mode(); |
|
136 | 135 | var cm = IPython.notebook.get_selected_cell().code_mirror; |
|
137 |
|
|
|
138 | cm.setCursor(0, prev_cursor.ch); | |
|
136 | cm.setCursor(0, 0); | |
|
139 | 137 | return false; |
|
140 | 138 | } else if (cell) { |
|
141 | 139 | var cm = cell.code_mirror; |
General Comments 0
You need to be logged in to leave comments.
Login now