author | Paul Mackerras <paulus@samba.org> | |
Sun, 30 Dec 2007 11:41:14 +0000 (22:41 +1100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Sun, 30 Dec 2007 11:41:14 +0000 (22:41 +1100) | ||
commit | 31c0eaa8cc10944ebca8aa31fb59f0b77b1b6e77 | |
tree | 171bb46daf15737b9e9a4627e89247fe69cbb51d | tree | snapshot |
parent | eb5f8c9c00716dd3f55b1f09329309a657c492e0 | commit | diff |
gitk: Keep the same commits visible as other commits come in
Since commits come in out of order and get sorted as we see them,
we can have commits coming in and being placed before the commits
that are visible in the graph display pane. Previously we just
displayed a certain range of row numbers, meaning that when
incoming commits were placed before the displayed range, the
displayed commits were displaced downwards. This makes it so
that we keep the same set of commits displayed, unless the user
explicitly scrolls the pane, in which case it scrolls as expected.
We do this by having a "target" commit which we try to keep in the
same visible position. If commits have come in before it we scroll
the canvases by the number of rows that it has moved in the display
order.
This also fixes a bug in rowofcommit where it would test
cached_commitrow before possibly calling update_arcrows, which is
where cached_commitrow gets invalidated if things have changed.
Now we call update_arcrows if necessary first.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Since commits come in out of order and get sorted as we see them,
we can have commits coming in and being placed before the commits
that are visible in the graph display pane. Previously we just
displayed a certain range of row numbers, meaning that when
incoming commits were placed before the displayed range, the
displayed commits were displaced downwards. This makes it so
that we keep the same set of commits displayed, unless the user
explicitly scrolls the pane, in which case it scrolls as expected.
We do this by having a "target" commit which we try to keep in the
same visible position. If commits have come in before it we scroll
the canvases by the number of rows that it has moved in the display
order.
This also fixes a bug in rowofcommit where it would test
cached_commitrow before possibly calling update_arcrows, which is
where cached_commitrow gets invalidated if things have changed.
Now we call update_arcrows if necessary first.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | diff | blob | history |