GNOME Bugzilla – Bug 629786
Highlight matching bracket wrong in comments and strings
Last modified: 2015-10-14 08:35:00 UTC
Steps to reproduce: 1. Ensure "Highlight matching bracket" option is selected in Edit->Preferences. 2. Turn on syntax highlighting for C++ (may work for other languages too, not tested), under View->Highlight Mode->Sources->C++. 3. Type: { //{ 4. With the cursor positioned at the end of the //{ line, type a closing }. Expected: The 2nd { is highlighted. i.e. { //*{*}| Actual: The 1st { is highlighted. i.e. *{* //{}| NB: if the cursor is moved away from this position, and then back to the end of line 2, the correct { is highlighted. Also, it works with any variety of bracket ([{.
*** Bug 621132 has been marked as a duplicate of this bug. ***
*** Bug 729891 has been marked as a duplicate of this bug. ***
The matching bracket code should ignore strings and comments context classes.
Bug #756537 is more recent, but has a clearer description. *** This bug has been marked as a duplicate of bug 756537 ***