Skip to content

Commit

Permalink
Fix microsoft#164715. Turn cell into editing mode when there is a sel…
Browse files Browse the repository at this point in the history
…ection. (microsoft#164758)
  • Loading branch information
rebornix authored and formigoni committed Oct 27, 2022
1 parent 66da5c6 commit b6419f3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,8 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
this.focusElement(cell);
const selection = cellOptions.options?.selection;
if (selection) {
cell.updateEditState(CellEditState.Editing, 'setOptions');
cell.focusMode = CellFocusMode.Editor;
await this.revealLineInCenterIfOutsideViewportAsync(cell, selection.startLineNumber);
} else if (options?.cellRevealType === CellRevealType.NearTopIfOutsideViewport) {
await this.revealNearTopIfOutsideViewportAync(cell);
Expand Down

0 comments on commit b6419f3

Please sign in to comment.