GNOME Bugzilla – Bug 762805
Search should be case-insensitive by default
Last modified: 2016-03-05 09:14:28 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.
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.
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?
This is how devhelp and IdePatternSpec work.
(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.
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 :)
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)))
Created attachment 323099 [details] [review] search: make search smart case sensitive Thanks for your review, I've updated the patch.
LGTM, thanks! Attachment 323099 [details] pushed as e47b73e - search: make search smart case sensitive