浏览代码

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;
   }