rem: if (i>=0) WMSetListPosition(list, i);
add: if (i>=0) { WMListItem *item = WMGetListItem(list, i); int textLen = strlen(text), itemTextLen = strlen(item->text);  WMSetListPosition(list, i);  if (panel->flags.autoCompletion) {  if (textLen < itemTextLen && textEvent!=WMDeleteTextEvent) { WMRange range;  WMInsertTextFieldText(panel->fileField, &item->text[textLen], textLen); WMSetTextFieldCursorPosition(panel->fileField, itemTextLen); range.position = textLen; range.count = itemTextLen - textLen; WMSelectTextFieldRange(panel->fileField, range); }  text1 = WMGetTextFieldText(panel->fileField); j = closestListItem(list, text1, True); if (i != j) { WMSelectListItem(list, j); if (j>=0) { WMSetListPosition(list, j); } } free(text1); } }
context: textChangedObserver(void *observerData, WMNotification *notification){    W_FilePanel *panel = (W_FilePanel*)observerData;    char *text;    WMList *list;    int col = WMGetBrowserNumberOfColumns(panel->browser) - 1;    int i;    list = WMGetBrowserListInColumn(panel->browser, col);    if (!list)	return;    text = WMGetTextFieldText(panel->fileField);    i = closestListItem(list, text);    WMSelectListItem(list, i);    if (i>=0)	WMSetListPosition(list, i);    free(text);}