Skip to content

Commit

Permalink
Port control enter fix to release (#4774)
Browse files Browse the repository at this point in the history
* Fix ctrl+enter and alt+enter by removing the redundant command. (#4769)

* Fix ctrl+enter and alt+enter by removing the redundant command.

* Code review feedback

* Update changelog
  • Loading branch information
rchiodo authored Feb 12, 2021
1 parent a59ef30 commit cec0d9d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
([#4538](https://github.com/Microsoft/vscode-jupyter/issues/4538))
1. Allow options to show native variable view only when looking at native notebooks.
([#4761](https://github.com/Microsoft/vscode-jupyter/issues/4761))
1. Fix CTRL+ENTER and ALT+ENTER to behave as expected for a jupyter notebook.
([#4713](https://github.com/Microsoft/vscode-jupyter/issues/4713))

### Code Health

Expand Down
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
{
"command": "jupyter.runcurrentcell",
"key": "ctrl+enter",
"when": "editorTextFocus && !editorHasSelection && jupyter.hascodecells && !notebookEditorFocused"
"when": "editorTextFocus && !editorHasSelection && jupyter.hascodecells && !notebookEditorFocused && !jupyter.havenativecells"
},
{
"command": "jupyter.runcurrentcellandaddbelow",
Expand Down Expand Up @@ -188,6 +188,11 @@
"when": "editorTextFocus && inputFocus && notebookEditorFocused && notebookViewType == jupyter-notebook && config.jupyter.enableKeyboardShortcuts",
"command": "notebook.cell.split"
},
{
"key": "ctrl+enter",
"when": "editorTextFocus && inputFocus && notebookEditorFocused && notebookViewType == jupyter-notebook && config.jupyter.enableKeyboardShortcuts",
"command": "notebook.cell.execute"
},
{
"command": "jupyter.insertCellBelowPosition",
"key": "ctrl+; s",
Expand Down Expand Up @@ -981,25 +986,25 @@
"command": "jupyter.runcurrentcell",
"title": "%jupyter.command.jupyter.runcurrentcell.title%",
"category": "Jupyter",
"when": "jupyter.hascodecells && jupyter.ispythonornativeactive"
"when": "jupyter.hascodecells && jupyter.ispythonornativeactive && !jupyter.havenativecells"
},
{
"command": "jupyter.runcurrentcelladvance",
"title": "%jupyter.command.jupyter.runcurrentcelladvance.title%",
"category": "Jupyter",
"when": "jupyter.hascodecells && jupyter.ispythonornativeactive"
"when": "jupyter.hascodecells && jupyter.ispythonornativeactive && !jupyter.havenativecells"
},
{
"command": "jupyter.runcurrentcellandallbelow.palette",
"title": "%jupyter.command.jupyter.runcurrentcellandallbelow.palette.title%",
"category": "Jupyter",
"when": "jupyter.hascodecells && jupyter.ispythonornativeactive"
"when": "jupyter.hascodecells && jupyter.ispythonornativeactive && !jupyter.havenativecells"
},
{
"command": "jupyter.runallcellsabove.palette",
"title": "%jupyter.command.jupyter.runallcellsabove.palette.title%",
"category": "Jupyter",
"when": "jupyter.hascodecells && jupyter.ispythonornativeactive"
"when": "jupyter.hascodecells && jupyter.ispythonornativeactive && !jupyter.havenativecells"
},
{
"command": "jupyter.debugcurrentcell.palette",
Expand Down

0 comments on commit cec0d9d

Please sign in to comment.