Quellcode durchsuchen

Fix handling of mode in runandinsert

Steven Silvester vor 8 Jahren
Ursprung
Commit
83144e40b1
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  1. 3 1
      src/notebook/notebook/actions.ts

+ 3 - 1
src/notebook/notebook/actions.ts

@@ -371,9 +371,11 @@ namespace NotebookActions {
     if (widget.activeCellIndex === widget.childCount() - 1) {
       let cell = model.factory.createCodeCell();
       model.cells.add(cell);
+      widget.activeCellIndex++;
       widget.mode = 'edit';
+    } else {
+      widget.activeCellIndex++;
     }
-    widget.activeCellIndex++;
     return promise;
   }