Skip to content

Commit 153f5c6

Browse files
authored
Fix microsoft#164715. Turn cell into editing mode when there is a selection. (microsoft#164758)
1 parent 5f87632 commit 153f5c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,8 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
11431143
this.focusElement(cell);
11441144
const selection = cellOptions.options?.selection;
11451145
if (selection) {
1146+
cell.updateEditState(CellEditState.Editing, 'setOptions');
1147+
cell.focusMode = CellFocusMode.Editor;
11461148
await this.revealLineInCenterIfOutsideViewportAsync(cell, selection.startLineNumber);
11471149
} else if (options?.cellRevealType === CellRevealType.NearTopIfOutsideViewport) {
11481150
await this.revealNearTopIfOutsideViewportAync(cell);

0 commit comments

Comments
 (0)