Fossil

Check-in [674da642]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:When computing a diff display, if the number of rows to skip between two diff regions is less than the context size, then go ahead and show the skip area as common text.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 674da6424a5a5faf85029f38d339aac92e2a125dfb0ed6aebbc0449ecc875bc1
User & Date: drh 2021-09-10 23:50:36
Context
2021-09-11
15:52
Tweak the diff-alignment scoring algorithm to give extra affinity to lines that share a common prefix. ... (check-in: 2921ec25 user: drh tags: trunk)
00:30
Merge recent trunk enhancements into the diff-js-refactoring branch. ... (check-in: a7fbefee user: drh tags: diff-js-refactoring)
2021-09-10
23:50
When computing a diff display, if the number of rows to skip between two diff regions is less than the context size, then go ahead and show the skip area as common text. ... (check-in: 674da642 user: drh tags: trunk)
15:53
Implemented diff.js arrow key scroll fix from [566b7f1165293655]. ... (check-in: c624ed86 user: stephan tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/diff.c.

2090
2091
2092
2093
2094
2095
2096







2097

2098
2099
2100
2101
2102
2103
2104

    /* Show the initial common area */
    a += skip;
    b += skip;
    m = R[r] - skip;
    if( r ) skip -= nContext;
    if( skip>0 ){







      pBuilder->xSkip(pBuilder, skip, 0);

    }
    for(j=0; j<m; j++){
      pBuilder->xCommon(pBuilder, &A[a+j]);
    }
    a += m;
    b += m;








>
>
>
>
>
>
>
|
>







2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112

    /* Show the initial common area */
    a += skip;
    b += skip;
    m = R[r] - skip;
    if( r ) skip -= nContext;
    if( skip>0 ){
      if( skip<nContext ){
        /* If the amount to skip is less that the context band, then
        ** go ahead and show the skip band as it is not worth eliding */
        for(j=0; j<skip; j++){
          pBuilder->xCommon(pBuilder, &A[a+j-skip]);
        }
      }else{
        pBuilder->xSkip(pBuilder, skip, 0);
      }
    }
    for(j=0; j<m; j++){
      pBuilder->xCommon(pBuilder, &A[a+j]);
    }
    a += m;
    b += m;