Skip to content

Commit

Permalink
Fix cell state persisted with wrong index
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Sep 14, 2020
1 parent 9b4bc5a commit 33c24b8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,11 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD

getEditorViewState(): INotebookEditorViewState {
const editingCells: { [key: number]: boolean } = {};
this._viewCells.filter(cell => cell.editState === CellEditState.Editing).forEach((cell, i) => editingCells[i] = true);
this._viewCells.forEach((cell, i) => {
if (cell.editState === CellEditState.Editing) {
editingCells[i] = true;
}
});
const editorViewStates: { [key: number]: editorCommon.ICodeEditorViewState } = {};
this._viewCells.map(cell => ({ handle: cell.model.handle, state: cell.saveEditorViewState() })).forEach((viewState, i) => {
if (viewState.state) {
Expand Down

0 comments on commit 33c24b8

Please sign in to comment.