Skip to content

Commit fd7b284

Browse files
committed
Fix problem in bracket-matching on the first line
1 parent 8b76140 commit fd7b284

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/codemirror.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ var CodeMirror = (function() {
11731173
}
11741174
}
11751175
}
1176-
for (var i = head.line, e = forward ? Math.min(i + 50, lines.length) : Math.max(0, i - 50); i != e; i+=d) {
1176+
for (var i = head.line, e = forward ? Math.min(i + 50, lines.length) : Math.max(-1, i - 50); i != e; i+=d) {
11771177
var line = lines[i], first = i == head.line;
11781178
var found = scan(line, first && forward ? pos + 1 : 0, first && !forward ? pos : line.text.length);
11791179
if (found) {

0 commit comments

Comments
 (0)