Show More
@@ -100,9 +100,8 b' var IPython = (function (IPython) {' | |||||
100 | help_index : '', |
|
100 | help_index : '', | |
101 | handler : function (event) { |
|
101 | handler : function (event) { | |
102 | var index = IPython.notebook.get_selected_index(); |
|
102 | var index = IPython.notebook.get_selected_index(); | |
103 | if (index !== null && index !== 0) { |
|
|||
104 |
|
|
103 | var cell = IPython.notebook.get_cell(index); | |
105 |
|
|
104 | if (cell && cell.at_top() && index !== 0) { | |
106 |
|
|
105 | event.preventDefault(); | |
107 |
|
|
106 | IPython.notebook.command_mode(); | |
108 |
|
|
107 | IPython.notebook.select_prev(); | |
@@ -118,16 +117,14 b' var IPython = (function (IPython) {' | |||||
118 |
|
|
117 | return false; | |
119 |
|
|
118 | } | |
120 |
|
|
119 | } | |
121 | } |
|
|||
122 | }, |
|
120 | }, | |
123 | 'down' : { |
|
121 | 'down' : { | |
124 | help : '', |
|
122 | help : '', | |
125 | help_index : '', |
|
123 | help_index : '', | |
126 | handler : function (event) { |
|
124 | handler : function (event) { | |
127 | var index = IPython.notebook.get_selected_index(); |
|
125 | var index = IPython.notebook.get_selected_index(); | |
128 | if (index !== null && index !== (IPython.notebook.ncells()-1)) { |
|
|||
129 |
|
|
126 | var cell = IPython.notebook.get_cell(index); | |
130 | if (cell && cell.at_bottom()) { |
|
127 | if (cell.at_bottom() && index !== (IPython.notebook.ncells()-1)) { | |
131 |
|
|
128 | event.preventDefault(); | |
132 |
|
|
129 | IPython.notebook.command_mode(); | |
133 |
|
|
130 | IPython.notebook.select_next(); | |
@@ -135,7 +132,7 b' var IPython = (function (IPython) {' | |||||
135 |
|
|
132 | var cm = IPython.notebook.get_selected_cell().code_mirror; | |
136 |
|
|
133 | cm.setCursor(0, 0); | |
137 |
|
|
134 | return false; | |
138 |
|
|
135 | } else { | |
139 |
|
|
136 | var cm = cell.code_mirror; | |
140 |
|
|
137 | var cursor = cm.getCursor(); | |
141 |
|
|
138 | cursor.line += 1; | |
@@ -143,7 +140,6 b' var IPython = (function (IPython) {' | |||||
143 |
|
|
140 | return false; | |
144 |
|
|
141 | } | |
145 |
|
|
142 | } | |
146 | } |
|
|||
147 | }, |
|
143 | }, | |
148 | 'alt+-' : { |
|
144 | 'alt+-' : { | |
149 | help : 'split cell', |
|
145 | help : 'split cell', |
General Comments 0
You need to be logged in to leave comments.
Login now