Skip to content

Commit d5d34ae

Browse files
torgeirmarijnh
authored andcommitted
Handle scanning for user provided brackets, e.g. "
1 parent 558c4ac commit d5d34ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

addon/edit/matchbrackets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
var ch = line.charAt(pos);
7070
if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {
7171
var match = matching[ch];
72-
if ((match.charAt(1) == ">") == (dir > 0)) stack.push(ch);
72+
if (match && (match.charAt(1) == ">") == (dir > 0)) stack.push(ch);
7373
else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};
7474
else stack.pop();
7575
}

0 commit comments

Comments
 (0)