Skip to content

Commit

Permalink
Refactor (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
firai authored Nov 10, 2023
1 parent 2046956 commit ff20442
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/labCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ export function addNotebookCommands(

if (current) {
const { context, content } = current;
NotebookActions.run(content, context.sessionContext);
// Don't re-enter edit mode for markdown cells
if (
content.activeCell !== null &&
content.activeCell.model.type === 'markdown'
) {
commands.execute('notebook:run-cell');
// no-op
} else {
NotebookActions.run(content, context.sessionContext);
current.content.mode = 'edit';
}
}
Expand Down

0 comments on commit ff20442

Please sign in to comment.