Subject: Re: [PATCH take 3 0/4] color-words improvements

From: Teemu Likonen <[email-masked]>
Date: Wed, 14 Jan 2009 20:54:24 +0200

Johannes Schindelin (2009-01-14 18:49 +0100) wrote:

> Can anybody think of undesired behavior as a consequence?
>
> Johannes Schindelin (4):
>   Add color_fwrite_lines(), a function coloring each line individually
>   color-words: refactor word splitting and use ALLOC_GROW()
>   color-words: change algorithm to allow for 0-character word
>     boundaries
>   color-words: take an optional regular expression describing words

There is something I don't understand. Maybe it's a bug or maybe it's my
limitation. I'd appreciate if you care to explain the reason of the
following output. Suppose we have two files and the line diff looks like
this:

    --- 1/a
    +++ 2/b
    @@ -1 +1 @@
    -aaa (aaa)
    +aaa (aaa) aaa

With --color-diff=a+ it looks like 

    aaa (aaa)aaa) aaa
         ^^^^~~~~ ~~~

^ = red, ~ = green

Why show changes in the "aaa)" part when it didn't actually change?