status: ensure items are visible when staging
commita614f5bacfe69c978fb390e7b89c3a588f34f814
authorDavid Aguilar <davvid@gmail.com>
Fri, 10 Aug 2018 09:06:37 +0000 (10 02:06 -0700)
committerDavid Aguilar <davvid@gmail.com>
Fri, 10 Aug 2018 09:14:44 +0000 (10 02:14 -0700)
tree0545a9b0ce694f0d7a4ca8e023c7f1e55f682a92
parent26a08a81d672f1123a1e80617cefe3ac464022cf
status: ensure items are visible when staging

We restore the scrollbar positions when refreshing, which means that
there are situations where the current item can scroll out of view.

This happens when many files are modified, and files near the bottom of
the viewport are staged.

Add a signal that gets triggered when the diff text actually changes.
This same event is also a point where the GUI can safely make the
current item visible, as we know that that the refresh was triggered by
something that changed the diff state.

Closes #870
Reported-by: Noel Grandin <noelgrandin@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
cola/models/main.py
cola/widgets/diff.py
cola/widgets/status.py