aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-11-08 13:43:08 -0800
committerJunio C Hamano <junkio@cox.net>2006-11-08 13:43:08 -0800
commit659db3f673fe199bad6ce9cc625d3a1b098bfbcf (patch)
tree4c5b36142043fedaae4def2312fc2cae7c9c835e
parent3a946802bb2c1106d12861849414f66fdba62303 (diff)
parent67c22874cf82edae9b5c5f0a47c432d08d7ad426 (diff)
downloadgit-659db3f673fe199bad6ce9cc625d3a1b098bfbcf.tar.gz
git-659db3f673fe199bad6ce9cc625d3a1b098bfbcf.tar.xz
Merge git://git.kernel.org/pub/scm/gitk/gitk
* git://git.kernel.org/pub/scm/gitk/gitk: [PATCH] gitk: Fix nextfile() and add prevfile()
-rwxr-xr-xgitk15
1 files changed, 15 insertions, 0 deletions
diff --git a/gitk b/gitk
index ebbeac63a..ab383b3ad 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
}
}
}