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 765955 - Moving between the search matches sets word_boundaries setting to TRUE
Moving between the search matches sets word_boundaries setting to TRUE
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: editor
3.21.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-04 01:24 UTC by Fangwen Yu
Modified: 2016-05-04 10:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ide-source-view: fix move search (1.55 KB, patch)
2016-05-04 01:26 UTC, Fangwen Yu
none Details | Review
ide-source-view: fix move search (4.56 KB, patch)
2016-05-04 09:32 UTC, Fangwen Yu
committed Details | Review

Description Fangwen Yu 2016-05-04 01:24:33 UTC
In Builder keybinding, when we hit Ctrl+G or Ctrl+Shift+G to move between the search matches, the word_boundaries setting will be set to TRUE.

If we are doing a search with word_boundaries being FALSE, hit Ctrl+G, and we are matching entire word only, which is a problem.

Moving between the matches should not modify the search settings.
Comment 1 Fangwen Yu 2016-05-04 01:26:52 UTC
Created attachment 327258 [details] [review]
ide-source-view: fix move search
Comment 2 Christian Hergert 2016-05-04 06:08:02 UTC
Do you think we should have a tri-state here? (Yes, No, Ingore)
Comment 3 Fangwen Yu 2016-05-04 09:32:23 UTC
Created attachment 327275 [details] [review]
ide-source-view: fix move search

I have yet to see a case where we want to explicitly set word_boundaries to FALSE when doing search movements. However, using FALSE for "DO NOTHING" isn't appropriate.

In the new patch, I use a gint value for word_boundaries: 0 -> FALSE, 1 -> TRUE, other -> IGNORE.

I've added comments for the relevant code in ide_source_view_real_move_search(), to prevent others from trying to "simplify" it.
Comment 4 Christian Hergert 2016-05-04 09:48:19 UTC
Review of attachment 327275 [details] [review]:

LGTM
Comment 5 Christian Hergert 2016-05-04 10:02:16 UTC
Attachment 327275 [details] pushed as 8a94ade - ide-source-view: fix move search