Keyboard selection of multiple lines in the notebook behaves inconsistently #787

Closed
khinsen opened this Issue Sep 13, 2011 · 5 comments

Comments

Projects
None yet
4 participants
@khinsen
Contributor

khinsen commented Sep 13, 2011

When selecting multiple lines in a notebook cell using SHIFT+Cursor down, the cursor moves to the next cell before selecting the last line of the current cell.

Expected behaviour: I'd expect editing to be limited to one cell, so the cursor should never leave when SHIFT is pressed. This is the case for moving left and right, but not up and down.

Tested using Chrome 13.0.782.220 under MacOS 10.5.

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Sep 13, 2011

Member

Yes, I've noticed the same and it's indeed quite annoying. Thanks for opening the issue. @ellisonbg, do you think this is easy to fix with CodeMirror or not? Konrad, just to fill you in: we use a little in-cell editor widget called CodeMirror, so some of these issues actually come from CodeMirror and we need to figure out if we can work around them or if we need them to be fixed in codemirror itself...

Member

fperez commented Sep 13, 2011

Yes, I've noticed the same and it's indeed quite annoying. Thanks for opening the issue. @ellisonbg, do you think this is easy to fix with CodeMirror or not? Konrad, just to fill you in: we use a little in-cell editor widget called CodeMirror, so some of these issues actually come from CodeMirror and we need to figure out if we can work around them or if we need them to be fixed in codemirror itself...

@ellisonbg

This comment has been minimized.

Show comment
Hide comment
@ellisonbg

ellisonbg Sep 14, 2011

Member

Not sure I will have to look into it.

Member

ellisonbg commented Sep 14, 2011

Not sure I will have to look into it.

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Nov 24, 2011

Member

I think the culprit is these lines in notebook.js: https://github.com/ipython/ipython/blob/master/IPython/frontend/html/notebook/static/js/notebook.js#L59

It looks like we're catching up/down to let us move to the next cell, but we're not checking anywhere if shift is in use with the key event.

Member

takluyver commented Nov 24, 2011

I think the culprit is these lines in notebook.js: https://github.com/ipython/ipython/blob/master/IPython/frontend/html/notebook/static/js/notebook.js#L59

It looks like we're catching up/down to let us move to the next cell, but we're not checking anywhere if shift is in use with the key event.

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Nov 24, 2011

Member

@takluyver, if you could have a shot at this one it would be great. It's not a huge deal but actually quite annoying in practice when editing a lot.

Member

fperez commented Nov 24, 2011

@takluyver, if you could have a shot at this one it would be great. It's not a huge deal but actually quite annoying in practice when editing a lot.

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Nov 24, 2011

Member

Closed by PR #1038: auto-close appears not to be working.

Member

takluyver commented Nov 24, 2011

Closed by PR #1038: auto-close appears not to be working.

@takluyver takluyver closed this Nov 24, 2011

stefanv pushed a commit to stefanv/ipython that referenced this issue Nov 30, 2011

Notebook: don't change cell when selecting code using shift+up/down.
Closes gh-787; closes gh-1038 (rebased to prevent recursive merge).

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

Notebook: don't change cell when selecting code using shift+up/down.
Closes gh-787; closes gh-1038 (rebased to prevent recursive merge).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment