summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2006-09-27 03:32:19 (GMT)
committerPaul Mackerras <paulus@samba.org>2006-10-19 00:10:11 (GMT)
commit67c22874cf82edae9b5c5f0a47c432d08d7ad426 (patch)
tree31822fa8d6d56a35e582a363832ba02efd7178b5 /gitk
parent561d038ab8adb2bab5ba368b88e620be18c4811b (diff)
downloadgit-67c22874cf82edae9b5c5f0a47c432d08d7ad426.zip
git-67c22874cf82edae9b5c5f0a47c432d08d7ad426.tar.gz
git-67c22874cf82edae9b5c5f0a47c432d08d7ad426.tar.bz2
[PATCH] gitk: Fix nextfile() and add prevfile()
The current nextfile() jumps to last hunk, but I think this is not intention, probably, it's forgetting to add "break;". And this patch also adds prevfile(), it jumps to previous hunk. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk15
1 files changed, 15 insertions, 0 deletions
diff --git a/gitk b/gitk
index ebbeac6..ab383b3 100755
--- a/gitk
+++ b/gitk
@@ -4440,12 +4440,27 @@ proc getblobdiffline {bdf ids} {
}
}
+proc prevfile {} {
+ global difffilestart ctext
+ set prev [lindex $difffilestart 0]
+ set here [$ctext index @0,0]
+ foreach loc $difffilestart {
+ if {[$ctext compare $loc >= $here]} {
+ $ctext yview $prev
+ return
+ }
+ set prev $loc
+ }
+ $ctext yview $prev
+}
+
proc nextfile {} {
global difffilestart ctext
set here [$ctext index @0,0]
foreach loc $difffilestart {
if {[$ctext compare $loc > $here]} {
$ctext yview $loc
+ return
}
}
}