##// END OF EJS Templates
go to appropriate line when coming from another cell...
Paul Ivanov -
Show More
@@ -107,12 +107,16 b' var IPython = (function (IPython) {'
107 107 IPython.notebook.command_mode();
108 108 IPython.notebook.select_prev();
109 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 113 return false;
111 114 } else if (cell) {
112 115 var cm = cell.code_mirror;
113 116 var cursor = cm.getCursor();
114 117 cursor.line -= 1;
115 118 cm.setCursor(cursor);
119 return false;
116 120 }
117 121 }
118 122 }
@@ -129,12 +133,16 b' var IPython = (function (IPython) {'
129 133 IPython.notebook.command_mode();
130 134 IPython.notebook.select_next();
131 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 139 return false;
133 140 } else if (cell) {
134 141 var cm = cell.code_mirror;
135 142 var cursor = cm.getCursor();
136 143 cursor.line += 1;
137 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