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 606621 - highlight matching bracket should match #ifdef and #endif in C highlight mode
highlight matching bracket should match #ifdef and #endif in C highlight mode
Status: RESOLVED DUPLICATE of bug 300458
Product: gtksourceview
Classification: Platform
Component: General
unspecified
Other All
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-11 12:30 UTC by glinsvad
Modified: 2013-03-30 18:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description glinsvad 2010-01-11 12:30:33 UTC
This would be a very helpful feature when developing in C as #ifdef's and #endif's are usually scattered over many lines, thus making it hard to keep track of manually.

Example code for a use case:

#ifndef SOMETHING

// code...

#ifdef ANOTHER_THING

// foo

#else THIRD_CONDITION

// bar

#endif

doStuff(arguments);

#endif


Placing the mouse over the #ifndef should highlight the latter #endif in a similar way to how matching brackets are highlighted. Preferably, one should be able to double-click to be taken to that line if is not visible in the display. A mouse-over on #ifdef should highlight both the #else and the matching #endif, preferably also with an option to be taken there.

P.S. I'm a C/Python developer myself, so I might be able to patch up something if I can get some pointers as to what and where I need to change.
Comment 1 Sébastien Wilmet 2013-03-30 18:12:23 UTC

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