# [PATCH] gitk: allow diff view without context lines

2 messages from 2009-05-23 to 2009-05-24. Participants: Markus Heidelberg, Paul Mackerras.
Thread: https://gitlist.dev/t/19451

## Markus Heidelberg, 2009-05-23 17:31

Subject: [PATCH] gitk: allow diff view without context lines
Message-ID: <1243099897-5530-1-git-send-email-markus.heidelberg@web.de>
URL: https://gitlist.dev/e/1243099897-5530-1-git-send-email-markus.heidelberg%40web.de

```

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
 gitk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitk b/gitk
index 1855390..322a442 100755
--- a/gitk
+++ b/gitk
@@ -2145,7 +2145,7 @@ proc makewindow {} {
     label .bleft.mid.labeldiffcontext -text "      [mc "Lines of context"]: "
     pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left
     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" \
 	-textvariable diffcontextstring
     .bleft.mid.diffcontext set $diffcontext
@@ -7306,7 +7306,7 @@ proc diffcontextchange {n1 n2 op} {
     global diffcontextstring diffcontext
 
     if {[string is integer -strict $diffcontextstring]} {
-	if {$diffcontextstring > 0} {
+	if {$diffcontextstring >= 0} {
 	    set diffcontext $diffcontextstring
 	    reselectline
 	}
-- 
1.6.3.1.160.g45b30

```

## Paul Mackerras, 2009-05-24 23:50

Subject: Re: [PATCH] gitk: allow diff view without context lines
Message-ID: <18969.56627.612284.890985@cargo.ozlabs.ibm.com>
URL: https://gitlist.dev/e/18969.56627.612284.890985%40cargo.ozlabs.ibm.com
In-Reply-To: <1243099897-5530-1-git-send-email-markus.heidelberg@web.de>

```
Thanks, applied.

Paul.

```
