diff options
Diffstat (limited to 'src/Document.cxx')
| -rw-r--r-- | src/Document.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index d4754233e..8e9c7d8c4 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -3010,7 +3010,7 @@ Sci::Position Document::BraceMatch(Sci::Position position, Sci::Position /*maxRe return -1; const int styBrace = StyleIndexAt(position); int direction = -1; - if (chBrace == '(' || chBrace == '[' || chBrace == '{' || chBrace == '<') + if (AnyOf(chBrace, '(', '[', '{', '<')) direction = 1; int depth = 1; position = useStartPos ? startPos : position + direction; @@ -3023,7 +3023,7 @@ Sci::Position Document::BraceMatch(Sci::Position position, Sci::Position /*maxRe while ((position >= 0) && (position < LengthNoExcept())) { const unsigned char chAtPos = CharAt(position); - if (chAtPos == chBrace || chAtPos == chSeek) { + if (AnyOf(chAtPos, chBrace, chSeek)) { if (((position > GetEndStyled()) || (StyleIndexAt(position) == styBrace)) && (chAtPos <= maxSafeChar || position == MovePositionOutsideChar(position, direction, false))) { depth += (chAtPos == chBrace) ? 1 : -1; |
