Skip to content

Commit

Permalink
chore: cleanup side effect
Browse files Browse the repository at this point in the history
  • Loading branch information
kahosan committed Sep 6, 2023
1 parent f4f5ff0 commit 745daf1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/src/components/EditorZone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ export default function EditorZone(props: EditorZoneProps) {
vimModeRef.current?.dispose()
vimModeRef.current = null
}

return () => {
vimModeRef.current?.dispose()
vimModeRef.current = null
}
}, [editor, isVimMode])

useDocumentEventListener('keydown', e => {
Expand Down

0 comments on commit 745daf1

Please sign in to comment.