Skip to content

Commit

Permalink
Fix bug which stopped Find from working when no frames are present
Browse files Browse the repository at this point in the history
  • Loading branch information
sedwards2009 committed Feb 7, 2020
1 parent e7247db commit 267129a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/Find/src/FindExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class FindWidget {
const termViewers = this._getViewers();
const needleRegExp = this._needleRegExp();

for (let i=termViewers.length-1; i> 0; i--) {
for (let i=termViewers.length-1; i>=0; i--) {
if (termViewers[i].find(needleRegExp, { backwards: true, startPosition: FindStartPosition.DOCUMENT_END })) {
break;
}
Expand Down Expand Up @@ -180,7 +180,7 @@ class FindWidget {
}
i--;

for ( ; i > 0; i--) {
for ( ; i >= 0; i--) {
if (termViewers[i].find(needleRegExp, { startPosition: FindStartPosition.DOCUMENT_END, backwards: true })) {
return;
}
Expand Down

0 comments on commit 267129a

Please sign in to comment.