Index: em-folder-view.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-view.c,v
retrieving revision 1.158
diff -u -p -r1.158 em-folder-view.c
--- em-folder-view.c	27 Aug 2006 05:35:46 -0000	1.158
+++ em-folder-view.c	27 Aug 2006 08:23:25 -0000
@@ -955,9 +955,12 @@ emfv_popup_delete(EPopup *ep, EPopupItem
 	count = em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED);
 	
 	if (count == 1) {
-		if (!message_list_select (emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0) && emfv->hide_deleted)
+		if (!emfv->list->threaded && !message_list_select (emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0) && emfv->hide_deleted)
 			message_list_select (emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, 0);
+		else if (emfv->list->threaded && emfv->hide_deleted)
+			message_list_select_uid (emfv->list, "");
 	}
+
 }
 
 static void
