diff -Nur balsa-temp/libbalsa/address-entry.c balsa-addy/libbalsa/address-entry.c
--- balsa-temp/libbalsa/address-entry.c	Fri Feb  1 12:46:44 2002
+++ balsa-addy/libbalsa/address-entry.c	Fri Feb  1 14:50:37 2002
@@ -941,26 +941,40 @@
  *   results:
  *     None?  Changes the appearance of the widget.
  *************************************************************/
+#define INNER_BORDER     2
 static void
 libbalsa_address_entry_draw(GtkWidget * widget, GdkRectangle * area)
 {
-    g_return_if_fail(widget != NULL);
-    g_return_if_fail(LIBBALSA_IS_ADDRESS_ENTRY(widget));
-    g_return_if_fail(area != NULL);
-
-    if (LIBBALSA_ADDRESS_ENTRY(widget)->alias_start_pos == 0
-        && LIBBALSA_ADDRESS_ENTRY(widget)->alias_end_pos == 0)
+    GtkEntry *entry = GTK_ENTRY(widget);
+    GtkEditable *editable = GTK_EDITABLE(widget);
+    LibBalsaAddressEntry *address_entry = LIBBALSA_ADDRESS_ENTRY(widget);
+    
+    if (editable->has_selection)
+        /* there's a real selection */
         (*GTK_WIDGET_CLASS(parent_class)->draw) (widget, area);
     else {
-        gint start = GTK_EDITABLE(widget)->selection_start_pos;
-        gint end = GTK_EDITABLE(widget)->selection_end_pos;
-        GTK_EDITABLE(widget)->selection_start_pos =
-            LIBBALSA_ADDRESS_ENTRY(widget)->alias_start_pos;
-        GTK_EDITABLE(widget)->selection_end_pos =
-            LIBBALSA_ADDRESS_ENTRY(widget)->alias_end_pos;
+        gint start = editable->selection_start_pos;
+        gint end = editable->selection_end_pos;
+        gint xoffset;
+        gint text_area_height;
+        
+        editable->selection_start_pos = address_entry->alias_start_pos;
+        editable->selection_end_pos = address_entry->alias_end_pos;
+
         (*GTK_WIDGET_CLASS(parent_class)->draw) (widget, area);
-        GTK_EDITABLE(widget)->selection_start_pos = start;
-        GTK_EDITABLE(widget)->selection_end_pos = end;
+
+        editable->selection_start_pos = start;
+        editable->selection_end_pos = end;
+        
+        /* FIXME: the cursor doesn't seem to get set, so here's one
+         * piece of code lifted from gtkentry.c: */
+        xoffset = INNER_BORDER + entry->char_offset[editable->current_pos];
+        xoffset -= entry->scroll_offset;
+        gdk_window_get_size(entry->text_area, NULL, &text_area_height);
+        gdk_draw_line(entry->text_area,
+                      widget->style->fg_gc[GTK_STATE_NORMAL], xoffset,
+                      INNER_BORDER, xoffset,
+                      text_area_height - INNER_BORDER);
     }
 }
 
@@ -2058,6 +2072,7 @@
 	 */
 	if (event->length > 0) {
 	    extend_selection = FALSE;
+	    editable->has_selection = FALSE;
 	    return_val = TRUE;
 	    libbalsa_keystroke_add_key(address_entry, event->string);
 	}
