提交 a41ddbb6 编写于 作者: M Markus Heidelberg 提交者: Paul Mackerras

gitk: Allow diff view without context lines

Signed-off-by: NMarkus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 e0a01995
...@@ -2146,7 +2146,7 @@ proc makewindow {} { ...@@ -2146,7 +2146,7 @@ proc makewindow {} {
label .bleft.mid.labeldiffcontext -text " [mc "Lines of context"]: " label .bleft.mid.labeldiffcontext -text " [mc "Lines of context"]: "
pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left
spinbox .bleft.mid.diffcontext -width 5 -font textfont \ spinbox .bleft.mid.diffcontext -width 5 -font textfont \
-from 1 -increment 1 -to 10000000 \ -from 0 -increment 1 -to 10000000 \
-validate all -validatecommand "diffcontextvalidate %P" \ -validate all -validatecommand "diffcontextvalidate %P" \
-textvariable diffcontextstring -textvariable diffcontextstring
.bleft.mid.diffcontext set $diffcontext .bleft.mid.diffcontext set $diffcontext
...@@ -7308,7 +7308,7 @@ proc diffcontextchange {n1 n2 op} { ...@@ -7308,7 +7308,7 @@ proc diffcontextchange {n1 n2 op} {
global diffcontextstring diffcontext global diffcontextstring diffcontext
if {[string is integer -strict $diffcontextstring]} { if {[string is integer -strict $diffcontextstring]} {
if {$diffcontextstring > 0} { if {$diffcontextstring >= 0} {
set diffcontext $diffcontextstring set diffcontext $diffcontextstring
reselectline reselectline
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册