diff options
| author | Neil <nyamatongwe@gmail.com> | 2026-04-13 11:31:36 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2026-04-13 11:31:36 +1000 |
| commit | 4db72474ccc799b6f39bb37604154cbcf33e08be (patch) | |
| tree | 6b9f00c323fb287b1f00bb27d2e5e581d9a2d9e2 /src/Document.cxx | |
| parent | 59d707bee0292d434513b28bcbfa7257c56a910c (diff) | |
| download | scintilla-mirror-4db72474ccc799b6f39bb37604154cbcf33e08be.tar.gz | |
Copy AnyOf from Lexilla to clarify code checking if a value is in a set.
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; |
