Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f9d696e

Browse filesBrowse files
committed
Merge pull request matplotlib#6752 from minrk/nbagg-select-next
FIX: explicitly select cell after figure on shift-enter
1 parent 44c206b commit f9d696e
Copy full SHA for f9d696e

File tree

Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed

‎lib/matplotlib/backends/web_backend/nbagg_mpl.js

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/web_backend/nbagg_mpl.js
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,9 @@ mpl.figure.prototype._key_event_extra = function(event, name) {
164164
// Check for shift+enter
165165
if (event.shiftKey && event.which == 13) {
166166
this.canvas_div.blur();
167-
event.shiftKey = false;
168-
// Send a "J" for go to next cell
169-
event.which = 74;
170-
event.keyCode = 74;
171-
manager.command_mode();
172-
manager.handle_keydown(event);
167+
// select the cell after this one
168+
var index = IPython.notebook.find_cell_index(this.cell_info[0]);
169+
IPython.notebook.select(index + 1);
173170
}
174171
}
175172

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.