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 349060 - Draw a vertical line on the left gutter for matching brackets spanning multiple lines
Draw a vertical line on the left gutter for matching brackets spanning multip...
Status: RESOLVED WONTFIX
Product: gtksourceview
Classification: Platform
Component: General
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-28 09:40 UTC by Nicola Giordani
Modified: 2018-05-26 13:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
added some lines to gtk_source_view_paint_margin (3.11 KB, patch)
2006-07-28 09:41 UTC, Nicola Giordani
none Details | Review
draw a vertical line on the left margin (7.15 KB, patch)
2006-07-28 12:34 UTC, Nicola Giordani
none Details | Review
draw a vertical line on the left margin (tests) (2.73 KB, patch)
2006-07-28 12:35 UTC, Nicola Giordani
none Details | Review
draw a vertical line on the left margin (7.15 KB, patch)
2006-07-28 12:37 UTC, Nicola Giordani
none Details | Review

Description Nicola Giordani 2006-07-28 09:40:17 UTC
I added some lines to gtk_source_view_paint_margin to make it draw a vertical line
starting from an opening bracket to the closing one (when they aren't on the same line).

I find it extremely useful when you have a long statement and you want to easily find on what lines the statement itself begins and ends.

It uses gtk_source_iter_find_matching_bracket to check for brackets and gtk_text_view_get_line_yrange to calculate where to draw the vertical line.
Comment 1 Nicola Giordani 2006-07-28 09:41:26 UTC
Created attachment 69808 [details] [review]
added some lines to gtk_source_view_paint_margin
Comment 2 Johannes Schmid 2006-07-28 09:48:41 UTC
That is a very useful addition especially for the source code editing. In Anjuta the scintilla component has this feature and I would love if gtksourceview could also include it.

Anyway, there should be an option to configure it.

Regards,
Johannes
Comment 3 Nicola Giordani 2006-07-28 12:32:44 UTC
(In reply to comment #2)
> That is a very useful addition especially for the source code editing. In
> Anjuta the scintilla component has this feature and I would love if
> gtksourceview could also include it.
> 
> Anyway, there should be an option to configure it.
> 
> Regards,
> Johannes
> 

I added the option to enable/disable it and i modified test-widget.c accordingly.

Please, let me know if you like it
Comment 4 Nicola Giordani 2006-07-28 12:34:36 UTC
Created attachment 69822 [details] [review]
draw a vertical line on the left margin

Added enable/disable option
Comment 5 Nicola Giordani 2006-07-28 12:35:59 UTC
Created attachment 69823 [details] [review]
draw a vertical line on the left margin (tests)

test-widget.c modified to support enabling/disabling of the feature added
Comment 6 Nicola Giordani 2006-07-28 12:37:38 UTC
Created attachment 69824 [details] [review]
draw a vertical line on the left margin

Added enabling/disabling of the feature
Comment 7 Johannes Schmid 2006-07-29 19:21:52 UTC
IMHO it is good now but I talked to the maintainers and they want to wait for GtkSourceView 2.0 which might have this feature together with code folding.

Regards,
Johannes
Comment 8 Paolo Borelli 2006-07-29 19:31:07 UTC
Yes, currently we are in the feature freeze period of the GNOME schedule so it will be some months before we can start adding new features. As Johannes said one of the things we plan is code-folding support, and code folding does something very similar showing in the margin how many lines the expanded fold takes
Comment 9 Johannes Schmid 2008-05-19 09:45:05 UTC
Patch would still be interesting! Any change to get this into 2.4?
Comment 10 Ignacio Casal Quinteiro (nacho) 2008-12-12 11:37:30 UTC
What about adding this implementation until we have the code folding? Once we have the code folding we can do something like in kate. Adding different colors to show the regions.
Comment 11 Sébastien Wilmet 2016-07-23 10:36:41 UTC
I've updated the bug title. Normally it's now a better description. Sounds useful.
Comment 12 Sébastien Wilmet 2018-05-26 13:46:17 UTC
It's unlikely that this feature is ever going to be implemented, so I close the bug.