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 743076 - redundant code to indent/unindent selection?
redundant code to indent/unindent selection?
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: editor
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-17 10:36 UTC by Paolo Borelli
Modified: 2015-01-18 23:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (10.00 KB, patch)
2015-01-17 13:57 UTC, Paolo Borelli
committed Details | Review

Description Paolo Borelli 2015-01-17 10:36:56 UTC
I was taking a peek at gb-source-view and I saw that you have code to indent/unindent a selection (gb_source_view_indent_selection etc).

gtksourceview already does this on tab/shift+tab, but admittedly it does not have a public indent_selection method.

Is the missing public method the reason to have this in gb-source-view or is there any other differences in behavior?

I propose to add gtk_source_buffer_indent_text(buffer, start, end), would that work for you?
Comment 1 Christian Hergert 2015-01-17 11:07:57 UTC
I think I needed it for the VIM module to call call on < or > when a selection is set. If you make that public ABI, I'd be happy to switch to that.
Comment 2 Paolo Borelli 2015-01-17 13:57:30 UTC
Created attachment 294736 [details] [review]
patch

I added the methods to gsv (turns out they need to be on the view since that's where we know the tab width etc)
Comment 3 Christian Hergert 2015-01-18 23:01:21 UTC
Looks good, thanks!