[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

PATCH: src/selection.c to fix Bug #4332



Attached is a patch to the latest src/selection.c in CVS that fixes
Bug #4332. 

Thanks,
Bake

Changelog:

1999-12-16 Bake Timmons <timmons@delanet.com>

        * src/selection.c (selection_apply): refine the tests deciding
          how to reconcile overlapping selections in the
          col_intersect = 4, row_intersect = 2 case.

--- selection.c.orig	Thu Dec  9 07:21:37 1999
+++ selection.c	Thu Dec 16 16:53:57 1999
@@ -895,17 +895,17 @@
 					break;
 
 				case 2 : /* b contains a */
-					if (a->end.col == b->end.col) {
+					if (a->start.col < b->start.col) {
 						/* Shrink existing range */
-						a->end.col = b->start.col - 1;
-						break;
-					} else if (a->start.col != b->start.col &&
-						   b->start.col > 0) {
+						if (a->end.col == b->end.col) {
+							a->end.col = b->start.col - 1;
+							break;
+						} else {
 						/* Split existing range */
-						tmp = range_copy (a);
-						tmp->end.col = b->start.col - 1;
-						clear = g_slist_prepend (clear,
-									 tmp);
+							tmp = range_copy(a);
+							tmp->end.col = b->start.col - 1;
+							clear = g_slist_prepend (clear, tmp);
+						}
 					}
 					/* Fall through to do bottom segment */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]