From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Schindelin Subject: Re: [PATCH v3 3/6] --color-words: Fix showing trailing deleted words at another line Date: Sun, 4 May 2008 10:52:26 +0100 (BST) Message-ID: References: <1209815828-6548-1-git-send-email-pkufranky@gmail.com> <1209874815-14411-1-git-send-email-pkufranky@gmail.com> <1209874815-14411-2-git-send-email-pkufranky@gmail.com> <1209874815-14411-3-git-send-email-pkufranky@gmail.com> <1209874815-14411-4-git-send-email-pkufranky@gmail.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: git@vger.kernel.org, gitster@pobox.com To: Ping Yin X-From: git-owner@vger.kernel.org Sun May 04 11:53:19 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1JsauE-0003Xh-8a for gcvg-git-2@gmane.org; Sun, 04 May 2008 11:53:18 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753301AbYEDJwa (ORCPT ); Sun, 4 May 2008 05:52:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753460AbYEDJwa (ORCPT ); Sun, 4 May 2008 05:52:30 -0400 Received: from mail.gmx.net ([213.165.64.20]:46221 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752940AbYEDJw3 (ORCPT ); Sun, 4 May 2008 05:52:29 -0400 Received: (qmail invoked by alias); 04 May 2008 09:52:27 -0000 Received: from dslb-088-067-220-031.pools.arcor-ip.net (EHLO dslb-088-067-220-031.pools.arcor-ip.net) [88.67.220.31] by mail.gmx.net (mp003) with SMTP; 04 May 2008 11:52:27 +0200 X-Authenticated: #1490710 X-Provags-ID: V01U2FsdGVkX1+67iNzNq+66vGR72Pq5jKD4zjdmW6G9CHko3khBU ktLtdJRXCJDGJe X-X-Sender: gene099@racer In-Reply-To: <1209874815-14411-4-git-send-email-pkufranky@gmail.com> User-Agent: Alpine 1.00 (DEB 882 2007-12-20) X-Y-GMX-Trusted: 0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Hi, On Sun, 4 May 2008, Ping Yin wrote: > With --color-words, following example will show deleted word "bar" at > another line. "will", or "used to"? > This is caused by the unsymmetrical handling of LF in the plus and minus > buffer in fn_out_diff_words_aux. Is it not rather caused by the need to replace non-word-characters with LF? > Following is original unsymmetrical handling rules where LF represents > a LF will be shown there. I cannot parse this sentence. > The second rule causes any word following the trailing plus word will > be shown in a different line. I cannot parse this sentence. > @@ -417,10 +418,11 @@ static void fn_out_diff_words_aux(void *priv, char *line, unsigned long len) > dwb_plus = &(diff_words->plus); > outfile = diff_words->file; > > - if (dwp_minus->suppressed_newline) { > - if (line[0] != '+') > - putc('\n', outfile); > - dwp_minus->suppressed_newline = 0; > + if ((dwb_minus->suppressed_newline && line[0] != '+') || If the previous version had dwp_minus, and the new version has dwb_minus, I wonder if both compile and pass the test suite. Ciao, Dscho