Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shift + [numeric keypad Enter] runs code as it was before cell edit #2524

Closed
ilze02 opened this issue Dec 18, 2019 · 9 comments
Closed

Shift + [numeric keypad Enter] runs code as it was before cell edit #2524

ilze02 opened this issue Dec 18, 2019 · 9 comments

Comments

@ilze02
Copy link

ilze02 commented Dec 18, 2019

There are two Enter buttons on my keyboard. The one that is on the main pad behaves as expected, but the one that is at the numeric keypad sometimes causes old code being run.

Steps:

  1. create new blank notebook;
  2. write:
    i = 9
    print(i)
  3. press Shift+Enter
  4. edit cell, replace 9 with 3
  5. press Shift+Enter (the one at numeric keypad)

Expected output: 3
Actual output: 9
image

This does not happen, when using the other Enter key. This happens only if Shift+Enter is used right after edit (does not happen, if notebook is saved between edit and run or if you move cursor to another cell and back between edit and run).

@rchiodo
Copy link
Contributor

rchiodo commented Dec 18, 2019

Shift + numeric key pad enter doesn't submit for me (it enters a new line)? What OS are you running on?

And if you go back and use the regular enter, does it work again?

Thanks.

@ilze02
Copy link
Author

ilze02 commented Dec 19, 2019

Windows 10.
Both Enters together with Shift for me runs the code in the cell.
"And if you go back and use the regular enter, does it work again?" <- yes. If i go back and use the "bad" Enter, it also works correctly.
The only time I see the unexpected behavior is when I run the cell with "bad" Enter right after editing the cell.

@greazer
Copy link
Member

greazer commented Dec 19, 2019

@ilze02 What version of the python extension are you using?

@rchiodo

@ilze02
Copy link
Author

ilze02 commented Dec 20, 2019

Python extension:
Version: 2019.11.50794

VSCode:
Version: 1.41.0 (user setup)
Commit: 9579eda04fdb3a9bba2750f15193e5fafe16b959
Date: 2019-12-11T18:37:42.077Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.17763

@ilze02
Copy link
Author

ilze02 commented Jan 13, 2020

@greazer, more info needed?

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Jan 13, 2020

Thanks for the information, please could you try updating to the latest version of the extension?

@ilze02
Copy link
Author

ilze02 commented Jan 21, 2020

Updated to latest version.
Now Shift + numpad Enter behaves as rchiodo explained: doesn't submit, enters a new line.

Better, but not ideal. Really used to JupyterLab behaviour (both Enters do the same thing). But If this is as designed, then I think we can close this issue.

@rchiodo
Copy link
Contributor

rchiodo commented Jan 21, 2020

Not by design, numpad enter should behave the same way.

@greazer
Copy link
Member

greazer commented Feb 14, 2020

Thanks for the feedback! However, we don't have plans on adding this functionality at this time. VS Code itself is investigating making notebooks a native experience in the editor. This particular problem will be solved by that effort.

@greazer greazer closed this as completed Feb 14, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 21, 2020
@microsoft microsoft unlocked this conversation Nov 13, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants