philc/vimium — pull request #1082 by fent (2014-06-25 03:39:21+00:00)
Title: ability to jump between scrolling jump history

Like in vim, Ctrl-O and Ctrl-I jump backward/forward respectively in jump history. "jump history" is basically any command that uses the `scroller.jumpTo()` function.

I've often needed to see something at the top/bottom of a tall page, but wanted to quickly go back to where I was. What I had to do was create a mark, jump, and then jump back to the mark. With this feature, jump history will already be recorded, having the user press less keys if they want to jump back.

Jump history is truncated if a user jumps back and then uses a `scroller.jumpTo()` command. History will also be updated if the user scrolls after they've jumped to a position and history, and then jumped again.

History is cleared if the activated element ever changes and is scrolled with a command. I wasn't sure how to keep history per element without editing the page structure. So it seemed like the best solution was to clear it.