author | Paul Mackerras <paulus@samba.org> | |
Sun, 23 Nov 2008 02:14:23 +0000 (13:14 +1100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Sun, 23 Nov 2008 02:14:23 +0000 (13:14 +1100) | ||
commit | 354af6bd69b442d0ce9449961f37d95ef12ba988 | |
tree | 511d03b133084015bc89adc4b6bb04c8020da1d8 | tree | snapshot |
parent | e11601381e384898418c30bd537a9daa1210c300 | commit | diff |
gitk: Restore scrolling position of diff pane on back/forward in history
This arranges to save the scrolling position of the diff display pane
when we move from displaying one thing to another, and then scroll the
pane to the same position when we go back to the previous thing using
the back or forward buttons. This works if we have clicked on a commit
and are in patch display mode, or if we have clicked on a line or a tag,
or have done a diff between two commits with the context menu. It
doesn't currently restore the pane to where it was if is was displaying
a commit in tree display mode.
For future extensibility, addtohistory now takes an extra optional
argument which is a script to invoke when moving from this thing to
another. The script needs to return a list of pairs of variable name
and value. If we go back to this thing, the godo procedure will set
the named variables to the values given. At present that is just used
to store the $ctext scrolling position, but in future we will use it
to store the state of which directories are open in the file list pane.
Signed-off-by: Paul Mackerras <paulus@samba.org>
This arranges to save the scrolling position of the diff display pane
when we move from displaying one thing to another, and then scroll the
pane to the same position when we go back to the previous thing using
the back or forward buttons. This works if we have clicked on a commit
and are in patch display mode, or if we have clicked on a line or a tag,
or have done a diff between two commits with the context menu. It
doesn't currently restore the pane to where it was if is was displaying
a commit in tree display mode.
For future extensibility, addtohistory now takes an extra optional
argument which is a script to invoke when moving from this thing to
another. The script needs to return a list of pairs of variable name
and value. If we go back to this thing, the godo procedure will set
the named variables to the values given. At present that is just used
to store the $ctext scrolling position, but in future we will use it
to store the state of which directories are open in the file list pane.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | diff | blob | history |