Show More
@@ -107,12 +107,16 b' var IPython = (function (IPython) {' | |||||
107 | IPython.notebook.command_mode(); |
|
107 | IPython.notebook.command_mode(); | |
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; | |||
|
111 | var prev_cursor = cell.code_mirror.getCursor(); | |||
|
112 | cm.setCursor(cm.lastLine(), prev_cursor.ch) | |||
110 | return false; |
|
113 | return false; | |
111 | } else if (cell) { |
|
114 | } else if (cell) { | |
112 | var cm = cell.code_mirror; |
|
115 | var cm = cell.code_mirror; | |
113 | var cursor = cm.getCursor(); |
|
116 | var cursor = cm.getCursor(); | |
114 | cursor.line -= 1; |
|
117 | cursor.line -= 1; | |
115 | cm.setCursor(cursor); |
|
118 | cm.setCursor(cursor); | |
|
119 | return false; | |||
116 | } |
|
120 | } | |
117 | } |
|
121 | } | |
118 | } |
|
122 | } | |
@@ -129,12 +133,16 b' var IPython = (function (IPython) {' | |||||
129 | IPython.notebook.command_mode(); |
|
133 | IPython.notebook.command_mode(); | |
130 | IPython.notebook.select_next(); |
|
134 | IPython.notebook.select_next(); | |
131 | IPython.notebook.edit_mode(); |
|
135 | IPython.notebook.edit_mode(); | |
|
136 | var cm = IPython.notebook.get_selected_cell().code_mirror; | |||
|
137 | var prev_cursor = cell.code_mirror.getCursor(); | |||
|
138 | cm.setCursor(0, prev_cursor.ch); | |||
132 | return false; |
|
139 | return false; | |
133 | } else if (cell) { |
|
140 | } else if (cell) { | |
134 | var cm = cell.code_mirror; |
|
141 | var cm = cell.code_mirror; | |
135 | var cursor = cm.getCursor(); |
|
142 | var cursor = cm.getCursor(); | |
136 | cursor.line += 1; |
|
143 | cursor.line += 1; | |
137 | cm.setCursor(cursor); |
|
144 | cm.setCursor(cursor); | |
|
145 | return false; | |||
138 | } |
|
146 | } | |
139 | } |
|
147 | } | |
140 | } |
|
148 | } |
General Comments 0
You need to be logged in to leave comments.
Login now