Fossil SCM
Merge the latest diff context loading fix.
Commit
4b1cf8d843341ebd43161445491ff60e6d44488d24b6a5350a703389a4d78032
Parent
498bc071cafc366…
1 file changed
+4
-3
+4
-3
| --- src/fossil.diff.js | ||
| +++ src/fossil.diff.js | ||
| @@ -280,12 +280,13 @@ | ||
| 280 | 280 | maybeReplaceButtons: function(){ |
| 281 | 281 | if(this.pos.next && this.pos.prev |
| 282 | 282 | && (this.pos.endLhs - this.pos.startLhs <= Diff.config.chunkLoadLines)){ |
| 283 | 283 | D.clearElement(this.e.btnWrapper); |
| 284 | 284 | D.append(this.e.btnWrapper, this.createButton(this.FetchType.FillGap)); |
| 285 | - if( this.$fetchQueue && this.$fetchQueue.length>0 ){ | |
| 286 | - this.$fetchQueue = [this.FetchType.FillGap]; | |
| 285 | + if( this.$fetchQueue && this.$fetchQueue.length>1 ){ | |
| 286 | + this.$fetchQueue[1] = this.FetchType.FillGap; | |
| 287 | + this.$fetchQueue.length = 2; | |
| 287 | 288 | } |
| 288 | 289 | } |
| 289 | 290 | return this; |
| 290 | 291 | }, |
| 291 | 292 | |
| @@ -578,11 +579,11 @@ | ||
| 578 | 579 | } |
| 579 | 580 | } |
| 580 | 581 | //console.debug("fetchChunk(",fetchType,")",up); |
| 581 | 582 | fOpt.onerror = function(err){ |
| 582 | 583 | self.msg(true,err.message); |
| 583 | - self.$fetchQueue = []; | |
| 584 | + self.$fetchQueue.length = 0; | |
| 584 | 585 | }; |
| 585 | 586 | Diff.fetchArtifactChunk(fOpt); |
| 586 | 587 | return this; |
| 587 | 588 | } |
| 588 | 589 | }; |
| 589 | 590 |
| --- src/fossil.diff.js | |
| +++ src/fossil.diff.js | |
| @@ -280,12 +280,13 @@ | |
| 280 | maybeReplaceButtons: function(){ |
| 281 | if(this.pos.next && this.pos.prev |
| 282 | && (this.pos.endLhs - this.pos.startLhs <= Diff.config.chunkLoadLines)){ |
| 283 | D.clearElement(this.e.btnWrapper); |
| 284 | D.append(this.e.btnWrapper, this.createButton(this.FetchType.FillGap)); |
| 285 | if( this.$fetchQueue && this.$fetchQueue.length>0 ){ |
| 286 | this.$fetchQueue = [this.FetchType.FillGap]; |
| 287 | } |
| 288 | } |
| 289 | return this; |
| 290 | }, |
| 291 | |
| @@ -578,11 +579,11 @@ | |
| 578 | } |
| 579 | } |
| 580 | //console.debug("fetchChunk(",fetchType,")",up); |
| 581 | fOpt.onerror = function(err){ |
| 582 | self.msg(true,err.message); |
| 583 | self.$fetchQueue = []; |
| 584 | }; |
| 585 | Diff.fetchArtifactChunk(fOpt); |
| 586 | return this; |
| 587 | } |
| 588 | }; |
| 589 |
| --- src/fossil.diff.js | |
| +++ src/fossil.diff.js | |
| @@ -280,12 +280,13 @@ | |
| 280 | maybeReplaceButtons: function(){ |
| 281 | if(this.pos.next && this.pos.prev |
| 282 | && (this.pos.endLhs - this.pos.startLhs <= Diff.config.chunkLoadLines)){ |
| 283 | D.clearElement(this.e.btnWrapper); |
| 284 | D.append(this.e.btnWrapper, this.createButton(this.FetchType.FillGap)); |
| 285 | if( this.$fetchQueue && this.$fetchQueue.length>1 ){ |
| 286 | this.$fetchQueue[1] = this.FetchType.FillGap; |
| 287 | this.$fetchQueue.length = 2; |
| 288 | } |
| 289 | } |
| 290 | return this; |
| 291 | }, |
| 292 | |
| @@ -578,11 +579,11 @@ | |
| 579 | } |
| 580 | } |
| 581 | //console.debug("fetchChunk(",fetchType,")",up); |
| 582 | fOpt.onerror = function(err){ |
| 583 | self.msg(true,err.message); |
| 584 | self.$fetchQueue.length = 0; |
| 585 | }; |
| 586 | Diff.fetchArtifactChunk(fOpt); |
| 587 | return this; |
| 588 | } |
| 589 | }; |
| 590 |