magit/magit — pull request #1408 by tarsius (2014-06-20 21:46:39+00:00)
Title: improve how a section is selected during buffer refresh

Do not attempt to restore `window-start` and do not fallback to
restoring `point` in case no successor section can be found.

Instead handle a few special cases (mostly related to un-/staging)
explicitly. And if everything else fails then simply go to the
beginning of the buffer (which, while not perfect, is a better
fallback than the old "scroll everything off screen" :-).

In other words, don't try to be smart, just get the work done.