From 5030c7cb439595904d2eb84cb582f619b1e4c822 Mon Sep 17 00:00:00 2001 From: Joyce Er Date: Thu, 8 Jul 2021 07:05:17 +0000 Subject: [PATCH] Fix https://github.com/microsoft/vscode-jupyter/issues/6582 --- news/2 Fixes/6582.md | 1 + src/client/datascience/commands/notebookCommands.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 news/2 Fixes/6582.md diff --git a/news/2 Fixes/6582.md b/news/2 Fixes/6582.md new file mode 100644 index 00000000000..10289d5cc26 --- /dev/null +++ b/news/2 Fixes/6582.md @@ -0,0 +1 @@ +`Ctrl+Enter` in native notebooks should put cell into command mode immediately, then run the cell. \ No newline at end of file diff --git a/src/client/datascience/commands/notebookCommands.ts b/src/client/datascience/commands/notebookCommands.ts index 979fdd7cf14..8255ae39052 100644 --- a/src/client/datascience/commands/notebookCommands.ts +++ b/src/client/datascience/commands/notebookCommands.ts @@ -59,8 +59,8 @@ export class NotebookCommands implements IDisposable { private executeCell() { void this.commandManager - .executeCommand('notebook.cell.execute') - .then(() => this.commandManager.executeCommand('notebook.cell.quitEdit')); + .executeCommand('notebook.cell.quitEdit') + .then(() => this.commandManager.executeCommand('notebook.cell.execute')); } private renderMarkdownAndSelectBelow() {