rem: if (j == 0) { if (width <= rect.pos.x && width + column->width > rect.pos.x) { range.position = i; j = 1;
add: if (!found) { if (rect.pos.x >= pos && rect.pos.x < pos + column->width) { range.position = i; range.count = 1; found = 1;
context: static WMRange columnsInRect(WMTableView *table, WMRect rect){    WMTableColumn *column;    int width;    int i , j;    int totalColumns = WMGetArrayItemCount(table->columns);    WMRange range;        j = 0;    width = 0;    for (i = 0; i < totalColumns; i++) {	column = WMGetFromArray(table->columns, i);	if (j == 0) {	    if (width <= rect.pos.x && width + column->width > rect.pos.x) {		range.position = i;		j = 1;	    }	} else {	    range.count++;	    if (width > rect.pos.x + rect.size.width) {		break;	    }	}	width += column->width;    }    range.count = WMAX(1, WMIN(range.count, totalColumns - range.position));    return range;}