views.status: Improve selection handling across updates
commit3d9770468830132ea74b4c7a2fbd7b2673cfc06f
authorDavid Aguilar <davvid@gmail.com>
Sat, 27 Feb 2010 12:24:36 +0000 (27 04:24 -0800)
committerDavid Aguilar <davvid@gmail.com>
Sat, 27 Feb 2010 12:24:36 +0000 (27 04:24 -0800)
tree6c7807b7b4248ab640f08070008cdee6c246b753
parentcf5fdeb99816e89901ca74417930f21fa783cf4a
views.status: Improve selection handling across updates

We now manage the selection across updates much more carefully.
When items are staged they are selected and their
diff is automatically shown.  Vice-versa for unstaged.

A group of selected items retains their selection across
category moves.  If an item moves into a new category,
we scroll the viewport to the item in that category.

Priority is given to the current, partially-staged diff
when interactively staging hunks.  Otherwise, we would
be breaking context by showing the unstaged diff and then
switching to the staged fragment.

Signed-off-by: David Aguilar <davvid@gmail.com>
cola/views/status.py