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