0

In the Log window, if a commit is selected, and another branch is shown/hidden, should try to not move commit in Graph pane

griscom 3 years ago updated 3 weeks ago 1

If the Branches pane is used to show/hide branches, then this may change the height of the displayed log tree. This has the effect of shifting the Graph window contents up or down.

If there is a commit selected and visible in the Graph window, then as possible the selected commit should be kept in-place as other branches are shown/hidden. Otherwise, the commit may move or even jump off the screen, which is confusing.

This won't always be possible (e.g. hiding a branch which is the only branch at the top or bottom of the visible area), but when it is it would be nice.

I came to suggest this, and found that I'd already suggested it.

A related item: if viewing a list of commits in the Graph view (even if one isn't selected) then showing/hiding branches and tags shouldn't scroll the visible commits off of the screen. Possible rules:

  1. If a visible commit is selected, and doesn't disappear with the change, then maintain its position on the screen
  2. Otherwise, find the commit closest to the vertical center of the Graph view that doesn't disappear with the change and then maintain its position.