Sanitize scrolling code, make it deal with being asked to show rect larger than view

Issue #2736
Scroll correct positions into view after undo/redo

Issue #2736