Overview
SHA1 Hash: | ba433cc4fc2cf67c07fbae0c16c57914445e3f74 |
---|---|
Date: | 2008-02-08 17:22:57 |
User: | drh |
Comment: | Avoid showing a short block of unchanged code at the end of a unified diff. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/diff.c from [464a37e277] to [fa6ef41ff5].
@@ -211,11 +211,11 @@ A = p->aFrom; B = p->aTo; R = p->aEdit; mxr = p->nEdit; - if( mxr>2 && R[mxr-1]==0 && R[mxr-2]==0 ){ mxr -= 3; } + while( mxr>2 && R[mxr-1]==0 && R[mxr-2]==0 ){ mxr -= 3; } for(r=0; r<mxr; r += 3*nr){ /* Figure out how many triples to show in a single block */ for(nr=1; R[r+nr*3]>0 && R[r+nr*3]<nContext*2; nr++){} /* printf("r=%d nr=%d\n", r, nr); */