mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
Fix discontinuity detection in revision traversal
This commit is contained in:
parent
186efe0b21
commit
360bb55dac
1 changed files with 2 additions and 2 deletions
|
@ -236,7 +236,6 @@ $.Class("RevisionCache",
|
||||||
var direction_edges = direction ? current.previous : current.next;
|
var direction_edges = direction ? current.previous : current.next;
|
||||||
for (var granularity in Revision.granularities) {
|
for (var granularity in Revision.granularities) {
|
||||||
if (Math.abs(delta_revnum) >= Revision.granularities[granularity]) {
|
if (Math.abs(delta_revnum) >= Revision.granularities[granularity]) {
|
||||||
console.log(delta_revnum, to.revnum, current.revnum);
|
|
||||||
/*
|
/*
|
||||||
* the delta is larger than the granularity, let's use the granularity
|
* the delta is larger than the granularity, let's use the granularity
|
||||||
*TODO: what happens if we DON'T have the edge?
|
*TODO: what happens if we DON'T have the edge?
|
||||||
|
@ -258,6 +257,7 @@ $.Class("RevisionCache",
|
||||||
// next granularity level. BUT, if we are at the lowest
|
// next granularity level. BUT, if we are at the lowest
|
||||||
// granularity and don't have an edge, we've reached a DISCONTINUITY
|
// granularity and don't have an edge, we've reached a DISCONTINUITY
|
||||||
// and can no longer continue.
|
// and can no longer continue.
|
||||||
|
if (Revision.granularities[granularity] == 1)
|
||||||
found_discontinuity = true;
|
found_discontinuity = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue