Hi Benny,

Sorry if I wasn't clear about what I was trying to say. Anyway, this libexo patch fixes the problem as I see it. I really think this is a better way to describe which files are between the anchor and the cursor.

Matt
Index: exo/exo-icon-view.c
===================================================================
--- exo/exo-icon-view.c	(revision 20797)
+++ exo/exo-icon-view.c	(working copy)
@@ -3811,24 +3811,32 @@
   gint row1, row2, col1, col2;
   gboolean dirty = FALSE;
   
-  if (anchor->row < cursor->row)
+  if (anchor->row == cursor->row)
     {
+      row2 = row1 = anchor->row;
+    
+      if (anchor->col < cursor->col)
+        {
+          col1 = anchor->col;
+          col2 = cursor->col;
+        }
+      else
+        {
+          col1 = cursor->col;
+          col2 = anchor->col;
+        }
+    }
+  else if (anchor->row < cursor->row)
+    {
       row1 = anchor->row;
       row2 = cursor->row;
+      col1 = anchor->col;
+      col2 = cursor->col;
     }
   else
     {
       row1 = cursor->row;
       row2 = anchor->row;
-    }
-
-  if (anchor->col < cursor->col)
-    {
-      col1 = anchor->col;
-      col2 = cursor->col;
-    }
-  else
-    {
       col1 = cursor->col;
       col2 = anchor->col;
     }
@@ -3837,16 +3845,23 @@
     {
       item = items->data;
 
-      if (row1 <= item->row && item->row <= row2 &&
-          col1 <= item->col && item->col <= col2)
-        {
-          if (!item->selected)
-            dirty = TRUE;
+      if (row1 == item->row && col1 == item->col)
+        break;
+    }
 
-          item->selected = TRUE;
-          
-          exo_icon_view_queue_draw_item (icon_view, item);
-        }
+  for (; items; items = items->next)
+    {
+      item = items->data;
+
+      if (!item->selected)
+        dirty = TRUE;
+
+      item->selected = TRUE;
+
+      exo_icon_view_queue_draw_item (icon_view, item);
+
+      if (row2 == item->row && col2 == item->col)
+        break;
     }
 
   return dirty;
_______________________________________________
Thunar-dev mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/thunar-dev

Reply via email to