emoji chooser: Match search terms better
authorMatthias Clasen <mclasen@redhat.com>
Fri, 4 May 2018 00:18:48 +0000 (20:18 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 4 May 2018 00:36:19 +0000 (20:36 -0400)
Use g_str_match_string for better results.

gtk/gtkemojichooser.c

index 69701ffcf1c364ac2990ded146cb698fd52b22c5..2783c3b654c22416cb2954c55c920c45eb3fead8 100644 (file)
@@ -497,7 +497,7 @@ filter_func (GtkFlowBoxChild *child,
     goto out;
 
   g_variant_get_child (emoji_data, 1, "&s", &name);
-  res = strstr (name, text) != NULL;
+  res = g_str_match_string (text, name, TRUE);
 
 out:
   if (res)