rem: && row >= 0) lPtr->selectedItem++;  row = WMIN(row, WMGetBagItemCount(lPtr->items));
add: && row >= 0) lPtr->selectedItem++;  row = WMIN(row, WMGetArrayItemCount(lPtr->items));
context: WMInsertListItem(WMList *lPtr, int row, char *text){    WMListItem *item;    CHECK_CLASS(lPtr, WC_List);    item = wmalloc(sizeof(WMListItem));    memset(item, 0, sizeof(WMListItem));    item->text = wstrdup(text);    if (lPtr->selectedItem >= row && lPtr->selectedItem >= 0	&& row >= 0)	lPtr->selectedItem++;        row = WMIN(row, WMGetBagItemCount(lPtr->items));        if (row < 0)	WMPutInBag(lPtr->items, item);    else	WMInsertInBag(lPtr->items, row, item);    /* update the scroller when idle, so that we don't waste time     * updating it when another item is going to be added later */    if (!lPtr->idleID) {	lPtr->idleID = WMAddIdleHandler((WMCallback*)updateScroller, lPtr);    }     return item;}