rem: tPtr->cursorPosition = tPtr->textLen;
add: tPtr->cursorPosition = tPtr->selection.position = tPtr->textLen;
context: WMSetTextFieldText(WMTextField *tPtr, char *text){    if ((text && strcmp(tPtr->text, text) == 0) ||        (!text && tPtr->textLen == 0))        return;    if (text==NULL) {	tPtr->text[0] = 0;	tPtr->textLen = 0;    } else {	tPtr->textLen = strlen(text);		if (tPtr->textLen >= tPtr->bufferSize) {	    tPtr->bufferSize = tPtr->textLen + TEXT_BUFFER_INCR;	    tPtr->text = realloc(tPtr->text, tPtr->bufferSize);	}	strcpy(tPtr->text, text);    }    /*    if (tPtr->textLen < tPtr->cursorPosition)	tPtr->cursorPosition = tPtr->textLen;     */    tPtr->cursorPosition = tPtr->textLen;    tPtr->viewPosition = 0;    tPtr->selection.count = 0;        if (tPtr->view->flags.realized)	paintTextField(tPtr);}