Fossil SCM
Tweak to side-by-side alignment: Be more aggressive about marking lines as changed if they are naturally aligned to begin with.
Commit
5d836cbda7b85086e891f65a44c3347bdb2a936b
Parent
9713e42356d07c7…
1 file changed
+1
-1
+1
-1
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -634,11 +634,11 @@ | ||
| 634 | 634 | m = a[i]+50; |
| 635 | 635 | d = 1; |
| 636 | 636 | } |
| 637 | 637 | if( m>p ){ |
| 638 | 638 | int score = match_dline(&aLeft[j-1], &aRight[i-1]); |
| 639 | - if( score<66 && m>p+score ){ | |
| 639 | + if( (score<66 || (i<j+1 && i>j-1)) && m>p+score ){ | |
| 640 | 640 | m = p+score; |
| 641 | 641 | d = 2; |
| 642 | 642 | } |
| 643 | 643 | } |
| 644 | 644 | p = a[i]; |
| 645 | 645 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -634,11 +634,11 @@ | |
| 634 | m = a[i]+50; |
| 635 | d = 1; |
| 636 | } |
| 637 | if( m>p ){ |
| 638 | int score = match_dline(&aLeft[j-1], &aRight[i-1]); |
| 639 | if( score<66 && m>p+score ){ |
| 640 | m = p+score; |
| 641 | d = 2; |
| 642 | } |
| 643 | } |
| 644 | p = a[i]; |
| 645 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -634,11 +634,11 @@ | |
| 634 | m = a[i]+50; |
| 635 | d = 1; |
| 636 | } |
| 637 | if( m>p ){ |
| 638 | int score = match_dline(&aLeft[j-1], &aRight[i-1]); |
| 639 | if( (score<66 || (i<j+1 && i>j-1)) && m>p+score ){ |
| 640 | m = p+score; |
| 641 | d = 2; |
| 642 | } |
| 643 | } |
| 644 | p = a[i]; |
| 645 |