Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Fix another bug in table handling for side-by-side diffs. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
db1365bc3bdc93d5c05afaf30dbccb63 |
| User & Date: | drh 2012-02-05 02:43:04.109 |
Context
|
2012-02-05
| ||
| 02:49 | Fix yet another issue with tables in side-by-side diffs - an off-by-one error this time. ... (check-in: de719b4396 user: drh tags: trunk) | |
| 02:43 | Fix another bug in table handling for side-by-side diffs. ... (check-in: db1365bc3b user: drh tags: trunk) | |
| 00:22 | Bug fix in the handling of tabs on a side-by-side diff. ... (check-in: 07a0ade926 user: drh tags: trunk) | |
Changes
Changes to src/diff.c.
| ︙ | ︙ | |||
382 383 384 385 386 387 388 |
/*
** Write up to width characters of pLine into z[]. Translate tabs into
** spaces. Add a newline if SBS_NEWLINE is set. Translate HTML characters
** if SBS_HTML is set. Pad the rendering out width bytes if SBS_PAD is set.
*/
static void sbsWriteText(SbsLine *p, DLine *pLine, unsigned flags){
int n = pLine->h & LENGTH_MASK;
| > > | < | | | 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 |
/*
** Write up to width characters of pLine into z[]. Translate tabs into
** spaces. Add a newline if SBS_NEWLINE is set. Translate HTML characters
** if SBS_HTML is set. Pad the rendering out width bytes if SBS_PAD is set.
*/
static void sbsWriteText(SbsLine *p, DLine *pLine, unsigned flags){
int n = pLine->h & LENGTH_MASK;
int i; /* Number of input characters consumed */
int j; /* Number of output characters generated */
int k; /* Cursor position */
const char *zIn = pLine->z;
char *z = &p->zLine[p->n];
int w = p->width;
for(i=j=k=0; k<w && i<n; i++, k++){
char c = zIn[i];
if( c=='\t' ){
z[j++] = ' ';
while( (k&7)!=0 && k<w ){ z[j++] = ' '; k++; }
}else if( c=='\r' || c=='\f' ){
z[j++] = ' ';
}else if( c=='<' && p->escHtml ){
memcpy(&z[j], "<", 4);
j += 4;
}else if( c=='&' && p->escHtml ){
memcpy(&z[j], "&", 5);
|
| ︙ | ︙ |