Fossil SCM

Fixed the auto-width diff display.

viriketo 2013-02-11 20:36 annotate_links
Commit 1b07b3d9b26d01b2634a0d35c7d5de9f1d9a49b7
1 file changed +3 -4
+3 -4
--- src/diff.c
+++ src/diff.c
@@ -1273,16 +1273,15 @@
12731273
int nContext; /* Lines of context above and below each change */
12741274
int showDivider = 0; /* True to show the divider */
12751275
12761276
memset(&s, 0, sizeof(s));
12771277
s.width = diff_width(diffFlags);
1278
- if (s.width == 0 && maxwidth == 0){ /* Autocalculate */
1278
+ if( s.width == 0 ) { /* May Autocalculate */
12791279
Blob dump;
1280
- /* Webserver */
1281
- maxwidth = -1;
1280
+ maxwidth = -1; /* The webserver may call sbsDiff more than once per process */
12821281
blob_zero(&dump);
1283
- sbsDiff(p, &dump, pRe, diffFlags);
1282
+ sbsDiff(p, &dump, pRe, diffFlags | DIFF_WIDTH_MASK);
12841283
s.width = maxwidth;
12851284
blob_reset(&dump);
12861285
}
12871286
s.zLine = fossil_malloc( 15*s.width + 200 );
12881287
if( s.zLine==0 ) return;
12891288
--- src/diff.c
+++ src/diff.c
@@ -1273,16 +1273,15 @@
1273 int nContext; /* Lines of context above and below each change */
1274 int showDivider = 0; /* True to show the divider */
1275
1276 memset(&s, 0, sizeof(s));
1277 s.width = diff_width(diffFlags);
1278 if (s.width == 0 && maxwidth == 0){ /* Autocalculate */
1279 Blob dump;
1280 /* Webserver */
1281 maxwidth = -1;
1282 blob_zero(&dump);
1283 sbsDiff(p, &dump, pRe, diffFlags);
1284 s.width = maxwidth;
1285 blob_reset(&dump);
1286 }
1287 s.zLine = fossil_malloc( 15*s.width + 200 );
1288 if( s.zLine==0 ) return;
1289
--- src/diff.c
+++ src/diff.c
@@ -1273,16 +1273,15 @@
1273 int nContext; /* Lines of context above and below each change */
1274 int showDivider = 0; /* True to show the divider */
1275
1276 memset(&s, 0, sizeof(s));
1277 s.width = diff_width(diffFlags);
1278 if( s.width == 0 ) { /* May Autocalculate */
1279 Blob dump;
1280 maxwidth = -1; /* The webserver may call sbsDiff more than once per process */
 
1281 blob_zero(&dump);
1282 sbsDiff(p, &dump, pRe, diffFlags | DIFF_WIDTH_MASK);
1283 s.width = maxwidth;
1284 blob_reset(&dump);
1285 }
1286 s.zLine = fossil_malloc( 15*s.width + 200 );
1287 if( s.zLine==0 ) return;
1288

Keyboard Shortcuts

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