author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 4 Jun 2007 08:07:35 +0000 (04:07 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 6 Jun 2007 05:26:52 +0000 (01:26 -0400) | ||
commit | 0dfed77b3cc81342aee4c81e477d636a378c51cb | |
tree | 25bdcfb7c9e918c10b5d99f93f346670c651f6d0 | tree | snapshot |
parent | 383d4e0f8b72f739c16ef7d723a134d59a0a0c2f | commit | diff |
git-gui: Jump to original line in blame viewer
When the user clicks on a commit link within one of the columns
in the blame viewer we now jump them not just to that commit/file
pair but also to the line of the original file. This saves the
user a lot of time, as they don't need to search through the new
file data for the chunk they were previously looking at.
We also restore the prior view when the user clicks the back button
to return to a pior commit/file pair that they were looking at.
Turned out this was quite tricky to get working in Tk. Every time
I tried to jump the text widgets to the correct locations by way
of the "yview moveto" or "see" subcommands Tk performed the change
until the current event finished dispatching, and then reset the
views back to 0, making the change never take place. Forcing Tk
to run the pending events before we jump the UI resolves the issue.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
When the user clicks on a commit link within one of the columns
in the blame viewer we now jump them not just to that commit/file
pair but also to the line of the original file. This saves the
user a lot of time, as they don't need to search through the new
file data for the chunk they were previously looking at.
We also restore the prior view when the user clicks the back button
to return to a pior commit/file pair that they were looking at.
Turned out this was quite tricky to get working in Tk. Every time
I tried to jump the text widgets to the correct locations by way
of the "yview moveto" or "see" subcommands Tk performed the change
until the current event finished dispatching, and then reset the
views back to 0, making the change never take place. Forcing Tk
to run the pending events before we jump the UI resolves the issue.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/blame.tcl | diff | blob | history |