From: Robert Fitzsimons <robfitz@273k.net>
To: Jacob Kroon <jacob.kroon@gmail.com>
Cc: paulus@samba.org, git@vger.kernel.org
Subject: [PATCH] gitk : fix missing lines when displaying diff.
Date: Tue, 7 Mar 2006 20:46:48 +0000 [thread overview]
Message-ID: <20060307204648.GA13620@localhost> (raw)
In-Reply-To: <440DE262.7020007@gmail.com>
Lines which are added (removed) and begin with +++ (---) are not shown
correctly when displaying in the diff panel.
The +++ and --- lines are part of the diff header, with the +++
indicating the end of the header.
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
---
gitk | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
d0da9f04cf565df64a954e1bfd4c5c0913b83322
diff --git a/gitk b/gitk
index f4c6624..5e3c34c 100755
--- a/gitk
+++ b/gitk
@@ -2595,8 +2595,10 @@ proc getblobdiffline {bdf ids} {
set pad [string range "----------------------------------------" 1 $l]
$ctext insert end "$pad $header $pad\n" filesep
set diffinhdr 1
- } elseif {[regexp {^(---|\+\+\+)} $line]} {
- set diffinhdr 0
+ } elseif {$diffinhdr == 1 && [regexp {^(---|\+\+\+) } $line]} {
+ if {[regexp {^\+\+\+ } $line]} {
+ set diffinhdr 0
+ }
} elseif {[regexp {^@@ -([0-9]+),([0-9]+) \+([0-9]+),([0-9]+) @@(.*)} \
$line match f1l f1c f2l f2c rest]} {
$ctext insert end "$line\n" hunksep
--
1.2.3.g20d2
next prev parent reply other threads:[~2006-03-07 20:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-07 19:43 gitk : Lines not showing up in diff Jacob Kroon
2006-03-07 20:46 ` Robert Fitzsimons [this message]
2006-03-07 22:17 ` [PATCH] gitk : fix missing lines when displaying diff Paul Mackerras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060307204648.GA13620@localhost \
--to=robfitz@273k.net \
--cc=git@vger.kernel.org \
--cc=jacob.kroon@gmail.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).