Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve automatic mode switching on page load
Previously, Normal mode was _always_ entered on location change (page load) (unless the page is blacklisted; then Ignore mode is entered instead). There were to reasons for this: Handling the blacklist, and auto-exiting hints mode (because hints left over from another page does not make sense in a new page). However, this caused a few problems: - If you used the `zF` command while a page was loading, the markers would disappear when the page fired the "location change" event. - There was an ugly special case for Find mode, making sure not to enter Normal mode if currently in Find mode (see commit fc7e61e). - Sometimes, you can enter Hints mode on a newly loaded page just before the page fires the "location change" event, making hints annoyingly disappear. This commit changes two things: - Hints mode is automatically exited (by returning to Normal mode) on the 'pagehide' event instead. - The current mode is only changed on location change _if needed._ That is, to auto-exit Ignore mode after navigating away from a blacklisted page, or auto-enter Ignore mode on blacklisted pages.
- Loading branch information