Skip to content

Commit

Permalink
Fix race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Jul 31, 2023
1 parent c24762c commit bf589e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/codemirrorCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ export class VimEditorManager {
this.userKeybindings = userKeybindings ?? [];
}

onActiveEditorChanged(
async onActiveEditorChanged(
tracker: IEditorTracker,
activeEditor: IDocumentWidget<FileEditor> | null
): void {
): Promise<void> {
if (!activeEditor) {
return;
}
await activeEditor.content.ready;
this.modifyEditor(activeEditor.content.editor);
}

Expand Down

0 comments on commit bf589e5

Please sign in to comment.