diff --git a/lib/codemirror.js b/lib/codemirror.js index 3ca4f28822..1dca8ff20a 100644 --- a/lib/codemirror.js +++ b/lib/codemirror.js @@ -1226,7 +1226,7 @@ var CodeMirror = (function() { var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)]; if (!match) return; var ch = match.charAt(0), forward = match.charAt(1) == ">", d = forward ? 1 : -1, st = line.styles; - for (var off = forward ? pos + 1 : pos, i = 0, e = st.length; i < e; i+=2) + for (var off = pos + 1, i = 0, e = st.length; i < e; i+=2) if ((off -= st[i].length) <= 0) {var style = st[i+1]; break;} var stack = [line.text.charAt(pos)], re = /[(){}[\]]/;