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 762805 - Search should be case-insensitive by default
Search should be case-insensitive by default
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: search
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-02-28 00:37 UTC by Michael Catanzaro
Modified: 2016-03-05 09:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
source-view: Make search case-insensitive (1.08 KB, patch)
2016-02-28 00:38 UTC, Michael Catanzaro
none Details | Review
search: make search smart case sensitive (1.63 KB, patch)
2016-03-04 12:10 UTC, Fangwen Yu
none Details | Review
search: make search smart case sensitive (1.65 KB, patch)
2016-03-04 15:12 UTC, Fangwen Yu
committed Details | Review

Description Michael Catanzaro 2016-02-28 00:37:29 UTC
I propose that search should be case-insensitive by default. This is much more useful than a case-sensitive search, because it makes it easier to find things and avoids user confusion. The downside is that you might have to go through extra results if you really wanted a case sensitive search, but that's better than not being able to find results at all.
Comment 1 Michael Catanzaro 2016-02-28 00:38:32 UTC
Created attachment 322560 [details] [review]
source-view: Make search case-insensitive

It's frustrating to have to guess the case of the words you're searching
for; this makes search significantly less-useful.
Comment 2 Alexandre Franke 2016-02-29 07:41:16 UTC
YouCompleteMe has this thing called smart-case sensitive (for filtering, but that should work the same for searching). If you type all lowercase, then it's case insensitive, but as soon as you type at least one uppercase, it becomes case sensitive.

What do you think about that?
Comment 3 Christian Hergert 2016-02-29 08:53:49 UTC
This is how devhelp and IdePatternSpec work.
Comment 4 Michael Catanzaro 2016-02-29 14:00:05 UTC
(In reply to Christian Hergert from comment #3)
> This is how devhelp and IdePatternSpec work.

It's a huge step up from case-sensitive search, so I'm fine with that.

It's also how Epiphany worked until a week ago, but we changed it to do insensitive search always because it's confusing, see bug #722019.
Comment 5 Fangwen Yu 2016-03-04 12:10:44 UTC
Created attachment 323080 [details] [review]
search: make search smart case sensitive

This patch makes search smart case sensitive, to match the
behavior of devhelp and IdePatternSpec, borrows some code from
devhelp :)
Comment 6 Christian Hergert 2016-03-04 12:22:24 UTC
Review of attachment 323080 [details] [review]:

::: libide/ide-source-view.c
@@ +1049,3 @@
+  if (search_text != NULL)
+    {
+      for (gint i = 0; search_text [i] != '\0'; i++)

We need to be UTF-8 safe here.

for (const gchar *s = search_text; *s; s = g_utf8_next_char (s))
  if (g_unichar_isupper (g_utf8_get_char (s)))
Comment 7 Fangwen Yu 2016-03-04 15:12:53 UTC
Created attachment 323099 [details] [review]
search: make search smart case sensitive

Thanks for your review, I've updated the patch.
Comment 8 Christian Hergert 2016-03-05 09:14:20 UTC
LGTM, thanks!

Attachment 323099 [details] pushed as e47b73e - search: make search smart case sensitive