提交 67c22874 编写于 作者: O OGAWA Hirofumi 提交者: Paul Mackerras

[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: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 561d038a
......@@ -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
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册