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 764178 - Search entry should support specifying newline, tab and other escape sequences
Search entry should support specifying newline, tab and other escape sequences
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: editor
3.20.x
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-25 06:32 UTC by Fangwen Yu
Modified: 2016-04-03 03:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
search entry: add support for escape sequences (5.25 KB, patch)
2016-03-25 06:40 UTC, Fangwen Yu
none Details | Review
search-entry: add support for escape sequences (5.26 KB, patch)
2016-03-30 13:53 UTC, Fangwen Yu
committed Details | Review

Description Fangwen Yu 2016-03-25 06:32:33 UTC
Currently there is no way to specify newline, tab and other escape sequences in the search entry. We should support escape sequences so users can write those characters easily.
Comment 1 Fangwen Yu 2016-03-25 06:40:29 UTC
Created attachment 324740 [details] [review]
search entry: add support for escape sequences

The transformation from search entry text to search text is explained in the commit message. When we transform selection text to search entry text, we need to escape it, depending on whether regex search option is enabled, call g_regex_escape_string() or gtk_source_utils_escape_search_text() respectively.

I leave multi-line search bubbles as a TODO for now.
Comment 2 Christian Hergert 2016-03-30 06:41:39 UTC
Review of attachment 324740 [details] [review]:

Couple quick changes

::: libide/editor/ide-editor-frame-actions.c
@@ +49,3 @@
+      GtkTextIter start_sel;
+      GtkTextIter end_sel;
+      g_autofree gchar *selected_text;

always set to NULL for autofree
Comment 3 Fangwen Yu 2016-03-30 13:53:11 UTC
Created attachment 325014 [details] [review]
search-entry: add support for escape sequences

set to NULL for g_autofree.
Comment 4 Christian Hergert 2016-04-03 03:01:38 UTC
Great! Thanks!

Attachment 325014 [details] pushed as 7201bbe - search-entry: add support for escape sequences