Browse Source

Fix handling of mode in runandinsert

Steven Silvester 8 năm trước cách đây
mục cha
commit
83144e40b1
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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;
   }