Skip to content

Commit 8eca1bc

Browse files
soswowmarijnh
authored andcommitted
SearchCursor.matches() doesn't work properly if query is /.*/ issue #1155
1 parent 4857377 commit 8eca1bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addon/search/searchcursor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
var line = cm.getLine(pos.line), match = query.exec(line),
3131
start = match && match.index;
3232
}
33-
if (match)
33+
if (match && match[0])
3434
return {from: {line: pos.line, ch: start},
3535
to: {line: pos.line, ch: start + match[0].length},
3636
match: match};

0 commit comments

Comments
 (0)