Skip to content

Commit 9aa55aa

Browse files
authored
Fix for attempting to update editor when there was none. (#95)
This lead to uncaught exception breaking application of vim dataset flag on notebooks, and thus breaking the Escape and commands in notebooks opened afterwards.
1 parent 169dc35 commit 9aa55aa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/codemirrorCommands.ts

+6
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ export class VimEditorManager {
6161
}
6262

6363
updateLastActive() {
64+
if (!this._lastActiveEditor) {
65+
return;
66+
}
6467
this.modifyEditor(this._lastActiveEditor);
6568
}
6669

@@ -161,6 +164,9 @@ export class VimCellManager extends VimEditorManager {
161164
}
162165

163166
updateLastActive() {
167+
if (!this._lastActiveCell) {
168+
return;
169+
}
164170
this.modifyCell(this._lastActiveCell);
165171
}
166172

0 commit comments

Comments
 (0)