Logging in to :pserver:anonymous@anoncvs.gnome.org:2401/cvs/gnome
Index: ephy-autocompletion.c
===================================================================
RCS file: /cvs/gnome/epiphany/lib/ephy-autocompletion.c,v
retrieving revision 1.10
diff -u -r1.10 ephy-autocompletion.c
--- ephy-autocompletion.c	23 Jun 2003 09:57:20 -0000	1.10
+++ ephy-autocompletion.c	12 Jul 2003 01:05:45 -0000
@@ -311,9 +311,17 @@
 	for (i = 0; i < oldmatches.num_matches; i++)
 	{
 		EphyAutocompletionMatch *mi = &oldmatches.array[i];
+		gchar *folded_match = NULL;
+		gchar *folded_key = NULL;
+
+		if (mi->match)
+		{
+			folded_match = g_utf8_casefold(mi->match, -1);
+			folded_key = g_utf8_casefold(p->keys[0], -1);
+		}
 
 		if (mi->is_action ||
-		    (mi->match && mi->substring && g_strrstr (mi->match, p->keys[0])) ||
+		    (mi->match && mi->substring && g_strrstr (folded_match, folded_key)) ||
 		    (mi->title && mi->substring && g_strrstr (mi->title, p->keys[0])) ||
 		    !strncmp (key0, mi->title + mi->offset, key0l))
 		{
@@ -323,6 +331,12 @@
 		{
 			p->changed = TRUE;
 		}
+
+		if (mi->match)
+		{
+			g_free(folded_match);
+			g_free(folded_key);
+		}
 	}
 
 	acma_destroy (&oldmatches);
@@ -363,7 +377,16 @@
 {
 	if (substring)
 	{
-		if ((item && g_strrstr (item, p->keys[0])) ||
+		gchar *folded_item = NULL;
+		gchar *folded_key = NULL;
+
+		if (item)
+		{
+			folded_item = g_utf8_casefold (item, -1);
+			folded_key = g_utf8_casefold (p->keys[0], p->key_lengths[0]);
+		}
+
+		if ((item && g_strrstr (folded_item, folded_key)) ||
 		    (title && g_strrstr (title, p->keys[0])))
 		{
 			EphyAutocompletionMatch m;
@@ -375,6 +398,12 @@
 			m.offset = 0;
 			m.score = score;
 			acma_append (&p->matches, &m, is_action);
+		}
+
+		if (item)
+		{
+			g_free (folded_item);
+			g_free (folded_key);
 		}
 	}
 	else if (is_action)
