@@ -450,7 +450,7 @@ export async function changeCellToKind(kind: CellKind, context: INotebookCellAct
450450 newCell . model . language = language ;
451451 }
452452
453- await notebookEditor . focusNotebookCell ( newCell , cell . editState === CellEditState . Editing ? 'editor' : 'container' ) ;
453+ notebookEditor . focusNotebookCell ( newCell , cell . editState === CellEditState . Editing ? 'editor' : 'container' ) ;
454454 notebookEditor . deleteNotebookCell ( cell ) ;
455455
456456 return newCell ;
@@ -475,7 +475,7 @@ abstract class InsertCellCommand extends NotebookAction {
475475 async runWithContext ( accessor : ServicesAccessor , context : INotebookCellActionContext ) : Promise < void > {
476476 const newCell = context . notebookEditor . insertNotebookCell ( context . cell , this . kind , this . direction , undefined , context . ui ) ;
477477 if ( newCell ) {
478- await context . notebookEditor . focusNotebookCell ( newCell , 'editor' ) ;
478+ context . notebookEditor . focusNotebookCell ( newCell , 'editor' ) ;
479479 }
480480 }
481481}
@@ -656,12 +656,12 @@ registerAction2(class extends NotebookAction {
656656 // deletion succeeds, move focus to the next cell
657657 const nextCellIdx = index < context . notebookEditor . viewModel ! . length ? index : context . notebookEditor . viewModel ! . length - 1 ;
658658 if ( nextCellIdx >= 0 ) {
659- await context . notebookEditor . focusNotebookCell ( context . notebookEditor . viewModel ! . viewCells [ nextCellIdx ] , 'container' ) ;
659+ context . notebookEditor . focusNotebookCell ( context . notebookEditor . viewModel ! . viewCells [ nextCellIdx ] , 'container' ) ;
660660 } else {
661661 // No cells left, insert a new empty one
662662 const newCell = context . notebookEditor . insertNotebookCell ( undefined , context . cell . cellKind ) ;
663663 if ( newCell ) {
664- await context . notebookEditor . focusNotebookCell ( newCell , 'editor' ) ;
664+ context . notebookEditor . focusNotebookCell ( newCell , 'editor' ) ;
665665 }
666666 }
667667 }
@@ -675,7 +675,7 @@ async function moveCell(context: INotebookCellActionContext, direction: 'up' | '
675675
676676 if ( result ) {
677677 // move cell command only works when the cell container has focus
678- await context . notebookEditor . focusNotebookCell ( result , 'container' ) ;
678+ context . notebookEditor . focusNotebookCell ( result , 'container' ) ;
679679 }
680680}
681681
@@ -684,7 +684,7 @@ async function copyCell(context: INotebookCellActionContext, direction: 'up' | '
684684 const newCellDirection = direction === 'up' ? 'above' : 'below' ;
685685 const newCell = context . notebookEditor . insertNotebookCell ( context . cell , context . cell . cellKind , newCellDirection , text ) ;
686686 if ( newCell ) {
687- await context . notebookEditor . focusNotebookCell ( newCell , 'container' ) ;
687+ context . notebookEditor . focusNotebookCell ( newCell , 'container' ) ;
688688 }
689689}
690690
@@ -1057,7 +1057,7 @@ registerAction2(class extends NotebookAction {
10571057 async runWithContext ( accessor : ServicesAccessor , context : INotebookCellActionContext ) : Promise < void > {
10581058 const editor = context . notebookEditor ;
10591059 const activeCell = context . cell ;
1060- await editor . focusNotebookCell ( activeCell , 'editor' ) ;
1060+ editor . focusNotebookCell ( activeCell , 'editor' ) ;
10611061 }
10621062} ) ;
10631063
@@ -1119,7 +1119,7 @@ registerAction2(class extends NotebookAction {
11191119 }
11201120
11211121 const firstCell = editor . viewModel . viewCells [ 0 ] ;
1122- await editor . focusNotebookCell ( firstCell , 'container' ) ;
1122+ editor . focusNotebookCell ( firstCell , 'container' ) ;
11231123 }
11241124} ) ;
11251125
@@ -1144,7 +1144,7 @@ registerAction2(class extends NotebookAction {
11441144 }
11451145
11461146 const firstCell = editor . viewModel . viewCells [ editor . viewModel . length - 1 ] ;
1147- await editor . focusNotebookCell ( firstCell , 'container' ) ;
1147+ editor . focusNotebookCell ( firstCell , 'container' ) ;
11481148 }
11491149} ) ;
11501150
@@ -1247,7 +1247,7 @@ export class ChangeCellLanguageAction extends NotebookAction {
12471247 if ( selection . languageId === 'markdown' && context . cell ?. language !== 'markdown' ) {
12481248 const newCell = await changeCellToKind ( CellKind . Markdown , { cell : context . cell , notebookEditor : context . notebookEditor } ) ;
12491249 if ( newCell ) {
1250- await context . notebookEditor . focusNotebookCell ( newCell , 'editor' ) ;
1250+ context . notebookEditor . focusNotebookCell ( newCell , 'editor' ) ;
12511251 }
12521252 } else if ( selection . languageId !== 'markdown' && context . cell ?. language === 'markdown' ) {
12531253 await changeCellToKind ( CellKind . Code , { cell : context . cell , notebookEditor : context . notebookEditor } , selection . languageId ) ;
@@ -1307,7 +1307,7 @@ async function splitCell(context: INotebookCellActionContext): Promise<void> {
13071307 if ( context . cell . cellKind === CellKind . Code ) {
13081308 const newCells = await context . notebookEditor . splitNotebookCell ( context . cell ) ;
13091309 if ( newCells ) {
1310- await context . notebookEditor . focusNotebookCell ( newCells [ newCells . length - 1 ] , 'editor' ) ;
1310+ context . notebookEditor . focusNotebookCell ( newCells [ newCells . length - 1 ] , 'editor' ) ;
13111311 }
13121312 }
13131313}
@@ -1342,7 +1342,7 @@ registerAction2(class extends NotebookAction {
13421342async function joinCells ( context : INotebookCellActionContext , direction : 'above' | 'below' ) : Promise < void > {
13431343 const cell = await context . notebookEditor . joinNotebookCells ( context . cell , direction , CellKind . Code ) ;
13441344 if ( cell ) {
1345- await context . notebookEditor . focusNotebookCell ( cell , 'editor' ) ;
1345+ context . notebookEditor . focusNotebookCell ( cell , 'editor' ) ;
13461346 }
13471347}
13481348
0 commit comments