Changeset 2135 for trunk/gui/src


Ignore:
Timestamp:
Mar 14, 2011 11:00:49 AM (13 years ago)
Author:
mmc
Message:

Changes for the regression tester. Fixed the Diffview widget to show
the highlight properly as the window is widened. Also, fixed the way
changes are handled at the very end after the last common line.

Added an "xml" method to the Tool object, so we can access the underlying
XML data for each run.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/src/RpDiffview.c

    r2132 r2135  
    15831583          - dvPtr->yOffset;
    15841584    x = dvPtr->inset - dvPtr->xOffset;
    1585     width = Tk_Width(tkwin);
     1585
     1586    if (Tk_Width(tkwin) > dvPtr->maxWidth) {
     1587        width = Tk_Width(tkwin)+10;
     1588    } else {
     1589        width = dvPtr->maxWidth+10;
     1590    }
    15861591
    15871592    for (i=dvPtr->topLine;
     
    23462351    DiffviewLines *lineLimitsPtr;   /* data structure being freed */
    23472352{
    2348     if (lineLimitsPtr->startPtr) {
    2349         ckfree((char*)lineLimitsPtr->startPtr);
    2350     }
    2351     if (lineLimitsPtr->lenPtr) {
    2352         ckfree((char*)lineLimitsPtr->lenPtr);
    2353     }
    2354     ckfree((char*)lineLimitsPtr);
     2353    if (lineLimitsPtr) {
     2354        if (lineLimitsPtr->startPtr) {
     2355            ckfree((char*)lineLimitsPtr->startPtr);
     2356        }
     2357        if (lineLimitsPtr->lenPtr) {
     2358            ckfree((char*)lineLimitsPtr->lenPtr);
     2359        }
     2360        ckfree((char*)lineLimitsPtr);
     2361    }
    23552362}
    23562363
     
    25942601        i++; j++;
    25952602    }
     2603
     2604    /* lines left over? mark as many "changed" as possible */
     2605    if (limsPtr1->numLines-i > 0 && limsPtr2->numLines-j > 0) {
     2606        del = (limsPtr1->numLines-i < limsPtr2->numLines-j)
     2607                ? limsPtr1->numLines-i : limsPtr2->numLines-j;
     2608        DiffviewDiffsAppend(diffPtr, 'c', i, i+del-1, j, j+del-1);
     2609        i += del;
     2610        j += del;
     2611    }
     2612
     2613    /* still have lines left over? then mark them added or deleted */
    25962614    if (i < limsPtr1->numLines) {
    25972615        del = limsPtr1->numLines - i;
Note: See TracChangeset for help on using the changeset viewer.