Fossil SCM

On a side-by-side diff, shift small differences as far to the left as possible.

drh 2013-02-15 15:14 trunk
Commit 89a2e88107f2e9a4547e79d1ce8885eacb51def1
1 file changed +2 -2
+2 -2
--- src/diff.c
+++ src/diff.c
@@ -893,12 +893,12 @@
893893
&& zLeft[nLeft-nSuffix-1]==zRight[nRight-nSuffix-1] ){
894894
nSuffix++;
895895
}
896896
if( nSuffix==nLeft || nSuffix==nRight ) nPrefix = 0;
897897
}
898
- if( nPrefix+nSuffix > nLeft ) nSuffix = nLeft - nPrefix;
899
- if( nPrefix+nSuffix > nRight ) nSuffix = nRight - nPrefix;
898
+ if( nPrefix+nSuffix > nLeft ) nPrefix = nLeft - nSuffix;
899
+ if( nPrefix+nSuffix > nRight ) nPrefix = nRight - nSuffix;
900900
901901
/* A single chunk of text inserted on the right */
902902
if( nPrefix+nSuffix==nLeft ){
903903
sbsWriteLineno(p, lnLeft);
904904
p->iStart2 = p->iEnd2 = 0;
905905
--- src/diff.c
+++ src/diff.c
@@ -893,12 +893,12 @@
893 && zLeft[nLeft-nSuffix-1]==zRight[nRight-nSuffix-1] ){
894 nSuffix++;
895 }
896 if( nSuffix==nLeft || nSuffix==nRight ) nPrefix = 0;
897 }
898 if( nPrefix+nSuffix > nLeft ) nSuffix = nLeft - nPrefix;
899 if( nPrefix+nSuffix > nRight ) nSuffix = nRight - nPrefix;
900
901 /* A single chunk of text inserted on the right */
902 if( nPrefix+nSuffix==nLeft ){
903 sbsWriteLineno(p, lnLeft);
904 p->iStart2 = p->iEnd2 = 0;
905
--- src/diff.c
+++ src/diff.c
@@ -893,12 +893,12 @@
893 && zLeft[nLeft-nSuffix-1]==zRight[nRight-nSuffix-1] ){
894 nSuffix++;
895 }
896 if( nSuffix==nLeft || nSuffix==nRight ) nPrefix = 0;
897 }
898 if( nPrefix+nSuffix > nLeft ) nPrefix = nLeft - nSuffix;
899 if( nPrefix+nSuffix > nRight ) nPrefix = nRight - nSuffix;
900
901 /* A single chunk of text inserted on the right */
902 if( nPrefix+nSuffix==nLeft ){
903 sbsWriteLineno(p, lnLeft);
904 p->iStart2 = p->iEnd2 = 0;
905

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button