Skip to content

Commit 02ff345

Browse files
author
David Kutugata
authored
When pressing ctrl+enter on a markdown cell, unfocus it so it renders (#11162)
* When pressing ctrl+enter on a markdown cell, unfocus it so it renders * add news file * changed a comment * reuse the function to escape the cell
1 parent d3116fe commit 02ff345

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

news/2 Fixes/10006.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ctrl+enter on markdown cells. Now they render.

src/datascience-ui/native-editor/nativeCell.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,11 @@ export class NativeCell extends React.Component<INativeCellProps> {
449449
e.stopPropagation();
450450
e.preventDefault();
451451

452+
// Escape the current cell if it is markdown to make it render
453+
if (this.isMarkdownCell()) {
454+
this.escapeCell(e);
455+
}
456+
452457
// Submit this cell
453458
this.submitCell('none');
454459
this.props.sendCommand(NativeCommandType.Run, 'keyboard');

0 commit comments

Comments
 (0)