codemirror-vim
codemirror-vim copied to clipboard
Reset global jumpList on unload
This PR resets the jumpList that contains document references on unload. This fixes an issue where the extension would attempt to access out-of-range document data when switching between files.
To replicate bug in dev environment:
- Type (insert mode)
moduleon first line of the Javascript editor - Tick "html"
- Type (normal mode)
/module - Press
nuntil last match is highlighted - Until "html"
- Press
n
Perhaps we need a way to keep some kind of document id in the jumplist, or keep the jumplist locally, because as far as i can tell with this change destroying an editor by e.g. closing an unfocused tab, will clear the jumplist of the focused tab