| 152 | } |
| 153 | |
| 154 | void LineLayout::SetBracesHighlight(Range rangeLine, Position braces[], |
| 155 | char bracesMatchStyle, int xHighlight, bool ignoreStyle) { |
| 156 | if (!ignoreStyle && rangeLine.ContainsCharacter(braces[0])) { |
| 157 | int braceOffset = braces[0] - rangeLine.start; |
| 158 | if (braceOffset < numCharsInLine) { |
| 159 | bracePreviousStyles[0] = styles[braceOffset]; |
| 160 | styles[braceOffset] = bracesMatchStyle; |
| 161 | } |
| 162 | } |
| 163 | if (!ignoreStyle && rangeLine.ContainsCharacter(braces[1])) { |
| 164 | int braceOffset = braces[1] - rangeLine.start; |
| 165 | if (braceOffset < numCharsInLine) { |
| 166 | bracePreviousStyles[1] = styles[braceOffset]; |
| 167 | styles[braceOffset] = bracesMatchStyle; |
| 168 | } |
| 169 | } |
| 170 | if ((braces[0] >= rangeLine.start && braces[1] <= rangeLine.end) || |
| 171 | (braces[1] >= rangeLine.start && braces[0] <= rangeLine.end)) { |
| 172 | xHighlightGuide = xHighlight; |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | void LineLayout::RestoreBracesHighlight(Range rangeLine, Position braces[], bool ignoreStyle) { |
| 177 | if (!ignoreStyle && rangeLine.ContainsCharacter(braces[0])) { |
no test coverage detected