codemirror-vim icon indicating copy to clipboard operation
codemirror-vim copied to clipboard

Reset global jumpList on unload

Open hrjakobsen opened this issue 3 years ago • 1 comments

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:

  1. Type (insert mode) module on first line of the Javascript editor
  2. Tick "html"
  3. Type (normal mode) /module
  4. Press n until last match is highlighted
  5. Until "html"
  6. Press n

hrjakobsen avatar Nov 30 '22 10:11 hrjakobsen

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

nightwing avatar Feb 08 '23 23:02 nightwing