Skip to content

Commit

Permalink
Revert "Fixes PieceTreeBase.equal (#181125)" (#181270)
Browse files Browse the repository at this point in the history
This reverts commit 3862229.
  • Loading branch information
roblourens authored May 1, 2023
1 parent 3862229 commit c74c003
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ export class PieceTreeBase {
return false;
}

let offset = 0;
const offset = 0;
const ret = this.iterate(this.root, node => {
if (node === SENTINEL) {
return true;
Expand All @@ -385,7 +385,6 @@ export class PieceTreeBase {
const endPosition = other.nodeAt(offset + len);
const val = other.getValueInRange2(startPosition, endPosition);

offset += len;
return str === val;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1595,12 +1595,6 @@ suite('buffer api', () => {
assert(!a.equal(d));
});

test('equal with more chunks', () => {
const a = createTextBuffer(['ab', 'cd', 'e']);
const b = createTextBuffer(['ab', 'c', 'de']);
assert(a.equal(b));
});

test('equal 2, empty buffer', () => {
const a = createTextBuffer(['']);
const b = createTextBuffer(['']);
Expand Down

0 comments on commit c74c003

Please sign in to comment.