Diff
Not logged in

Differences From:

File src/diff.c part of check-in [eae7ddfa4e] - Add support for annotation in the web interface. by drh on 2008-02-04 18:28:55. [view]

To:

File src/diff.c part of check-in [ba433cc4fc] - Avoid showing a short block of unchanged code at the end of a unified diff. by drh on 2008-02-08 17:22:57. [view]

@@ -212,9 +212,9 @@
   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); */