Fixing undo/redo across pages.

This just replicates the functionality already used elsewhere to perform
scrolling.  At some point it should be refactored to be shared.