Преглед изворни кода

Fix handling of mode in runandinsert

Steven Silvester пре 8 година
родитељ
комит
83144e40b1
1 измењених фајлова са 3 додато и 1 уклоњено
  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;
   }