After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 629786 - Highlight matching bracket wrong in comments and strings
Highlight matching bracket wrong in comments and strings
Status: RESOLVED DUPLICATE of bug 756537
Product: gtksourceview
Classification: Platform
Component: General
unspecified
Other Linux
: Normal minor
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
: 621132 729891 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-09-15 18:42 UTC by test_test_testing
Modified: 2015-10-14 08:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description test_test_testing 2010-09-15 18:42:42 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 ([{.
Comment 1 Sébastien Wilmet 2014-05-09 19:51:32 UTC
*** Bug 621132 has been marked as a duplicate of this bug. ***
Comment 2 Sébastien Wilmet 2014-05-09 19:52:03 UTC
*** Bug 729891 has been marked as a duplicate of this bug. ***
Comment 3 Sébastien Wilmet 2014-05-09 19:53:10 UTC
The matching bracket code should ignore strings and comments context classes.
Comment 4 Sébastien Wilmet 2015-10-14 08:35:00 UTC
Bug #756537 is more recent, but has a clearer description.

*** This bug has been marked as a duplicate of bug 756537 ***