--- gtk+2.0-2.16.1/gtk/gtktextbuffer.c	2009-04-04 06:51:45.000000000 +0200
+++ gtk+2.0-2.16.1-new/gtk/gtktextbuffer.c	2009-05-31 15:03:56.371653038 +0200
@@ -2415,7 +2415,10 @@
   real_ins = *ins;
   real_bound = *bound;
 
-  _gtk_text_btree_select_range (get_btree (buffer), &real_ins, &real_bound);
+  if (gtk_text_iter_compare (ins, bound) != 0) /* don't clear the PRIMARY selection when only moving the cursor */
+  {
+    _gtk_text_btree_select_range (get_btree (buffer), &real_ins, &real_bound);
+  }
   gtk_text_buffer_mark_set (buffer, &real_ins,
                             gtk_text_buffer_get_insert (buffer));
   gtk_text_buffer_mark_set (buffer, &real_bound,
