Index: lib/widgets/ephy-location-entry.c
===================================================================
--- lib/widgets/ephy-location-entry.c	(revision 7972)
+++ lib/widgets/ephy-location-entry.c	(working copy)
@@ -71,6 +71,7 @@ struct _EphyLocationEntryPrivate
 	GdkColor secure_fg_colour;
 
 	GtkCellRenderer *extracell;
+	GRegex *regex;
 
 	char *before_completion;
 	char *saved_text;
@@ -114,6 +115,12 @@ static void extracell_data_func (GtkCell
 				GtkTreeIter *iter,
 				gpointer data);
 
+static void textcell_data_func (GtkCellLayout *cell_layout,
+			GtkCellRenderer *cell,
+			GtkTreeModel *tree_model,
+			GtkTreeIter *iter,
+			gpointer data);
+
 static GObjectClass *parent_class = NULL;
 
 enum signalsEnum
@@ -231,6 +238,9 @@ ephy_location_entry_finalize (GObject *o
 	{
 		g_object_unref (priv->favicon);
 	}
+	
+	if (priv->regex)
+		g_regex_unref (priv->regex);
 
 	parent_class->finalize (object);
 }
@@ -347,6 +357,11 @@ editable_changed_cb (GtkEditable *editab
 	EphyLocationEntryPrivate *priv = entry->priv;
 
 	update_address_state (entry);
+	
+	if (priv->regex)
+		g_regex_unref (priv->regex);
+	priv->regex = g_regex_new (gtk_entry_get_text (GTK_ENTRY (editable)), 
+				G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY, NULL);
 
 	if (priv->block_update == TRUE) 
 		return;
@@ -925,7 +940,8 @@ ephy_location_entry_init (EphyLocationEn
 	p->user_changed = FALSE;
 	p->block_update = FALSE;
 	p->saved_text = NULL;
-
+	p->regex = NULL;
+	
 	ephy_location_entry_construct_contents (le);
 
 	gtk_tool_item_set_expand (GTK_TOOL_ITEM (le), TRUE);
@@ -966,7 +982,6 @@ cursor_on_match_cb  (GtkEntryCompletion 
 	gtk_tree_model_get (model, iter,
 			    le->priv->url_col,
 			    &item, -1);
-	
 	entry = gtk_entry_completion_get_entry (completion);
 	gtk_entry_set_text (GTK_ENTRY (entry), item);
 	gtk_editable_set_position (GTK_EDITABLE (entry), -1);
@@ -1002,6 +1017,35 @@ extracell_data_func (GtkCellLayout *cell
 	g_value_unset (&visible);
 }
 
+static void
+textcell_data_func (GtkCellLayout *cell_layout,
+			GtkCellRenderer *cell,
+			GtkTreeModel *tree_model,
+			GtkTreeIter *iter,
+			gpointer data)
+{
+	char *cdata;
+	char *cdata_escaped;
+	char *markup_final;
+	GRegex *regex;
+	GValue markup = { 0, };
+	EphyLocationEntryPrivate *priv;
+	
+	priv = EPHY_LOCATION_ENTRY (data)->priv;
+	gtk_tree_model_get (tree_model, iter, priv->text_col, &cdata, -1);
+
+	g_value_init (&markup, G_TYPE_STRING);
+
+	/* This is because urls can break markup due to =, &, blah blah */
+	cdata_escaped = g_markup_escape_text (cdata, -1);
+	markup_final = g_regex_replace (priv->regex, cdata_escaped, -1, 0, "<b>\\0</b>", G_REGEX_MATCH_NOTEMPTY, NULL);
+	
+	g_value_take_string (&markup, markup_final);
+	g_object_set_property (G_OBJECT (cell), "markup", &markup);
+	g_value_unset (&markup);
+}
+
+
 void
 ephy_location_entry_set_completion_func (EphyLocationEntry *le, 
 					GtkEntryCompletionMatchFunc completion_func,
@@ -1084,6 +1128,11 @@ ephy_location_entry_set_completion (Ephy
 					GUINT_TO_POINTER (extra_col),
 					NULL);
 
+	gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (completion),
+					cell, textcell_data_func, 
+					le,
+					NULL);
+
 	g_object_set (completion, "inline-selection", TRUE, NULL);
 	g_signal_connect (completion, "cursor-on-match",
 			  G_CALLBACK (cursor_on_match_cb), le);
