Skip to content

Commit

Permalink
Correctly account for modified rows that shifted in the current delta (
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 authored Nov 16, 2021
1 parent 53f9df8 commit b46f3f2
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,11 @@ public MergeResults merge(DeltaUpdates updates) {
}
}

for (Iterator<Integer> it = updated.modified.iterator(); it.hasNext();) {
int ii = it.next();
updated.added.remove(ii);
updated.removed.remove(ii);
}
// exclude added items from being marked as modified, since we're hiding shifts from api consumers
updated.modified.removeAll(updated.added);

// Any position which was both added and removed should instead be marked as modified, this cleans
// up anything excluded above that didn't otherwise make sense
for (Iterator<Integer> it = updated.removed.iterator(); it.hasNext();) {
int ii = it.next();
if (updated.added.remove(ii)) {
Expand Down

0 comments on commit b46f3f2

Please sign in to comment.