Skip to content

Commit

Permalink
Cannot use RegExp.lastIndex to -1 because it will not find any matche…
Browse files Browse the repository at this point in the history
…s afterwards on Safari (#90063)
  • Loading branch information
alexdima committed Feb 5, 2020
1 parent 4deae50 commit ed6fae9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ export class PieceTreeBase {
if (searcher._wordSeparators) {
searchText = buffer.buffer.substring(start, end);
offsetInBuffer = (offset: number) => offset + start;
searcher.reset(-1);
searcher.reset(0);
} else {
searchText = buffer.buffer;
offsetInBuffer = (offset: number) => offset;
Expand Down

0 comments on commit ed6fae9

Please sign in to comment.