rem: if(!*buffer) return;
context: handleTextKeyPress(Text *tPtr, XEvent *event){    char buffer[64];    KeySym ksym;    int control_pressed = False;    TextBlock *tb = NULL;    if (((XKeyEvent *) event)->state & ControlMask)        control_pressed = True;    buffer[XLookupString(&event->xkey, buffer, 63, &ksym, NULL)] = 0;    if(!*buffer)         return;        switch(ksym) {        case XK_Left:         if(!(tb = tPtr->currentTextBlock))            break;            if(tb->graphic)                 goto L_imaGFX;                        if(tPtr->tpos==0) { L_imaGFX:       if(tb->prior) {                    tPtr->currentTextBlock = tb->prior;                    tPtr->tpos = tPtr->currentTextBlock->used -1;                } else tPtr->tpos = 0;            } else tPtr->tpos--;            updateCursorPosition(tPtr);            paintText(tPtr);         break;        case XK_Right:          if(!(tb = tPtr->currentTextBlock))            break;            if(tb->graphic)                 goto R_imaGFX;           if(tPtr->tpos == tb->used) {R_imaGFX:      if(tb->next) {                    tPtr->currentTextBlock = tb->next;                    tPtr->tpos = 1;                } else tPtr->tpos = tb->used;            } else  tPtr->tpos++;            updateCursorPosition(tPtr);            paintText(tPtr);        break;                    case XK_Down:            cursorToTextPosition(tPtr, tPtr->cursor.x + tPtr->visible.x,                 tPtr->clicked.y + tPtr->cursor.h - tPtr->vpos);            paintText(tPtr);                    break;        case XK_Up:              cursorToTextPosition(tPtr, tPtr->cursor.x + tPtr->visible.x,                 tPtr->visible.y + tPtr->cursor.y - tPtr->vpos - 3);            paintText(tPtr);                break;        case XK_BackSpace:        case XK_Delete:#ifdef XK_KP_Delete        case XK_KP_Delete:#endif            deleteTextInteractively(tPtr, ksym);            updateCursorPosition(tPtr);            paintText(tPtr);        break;        case XK_Control_R :        case XK_Control_L :            control_pressed = True;        break;        case XK_Tab:            insertTextInteractively(tPtr, "    ", 4);            updateCursorPosition(tPtr);            paintText(tPtr);        break;        case XK_Return:            *buffer = '\n';        default:        if (*buffer != 0 && !control_pressed) {            insertTextInteractively(tPtr, buffer, strlen(buffer));            updateCursorPosition(tPtr);            paintText(tPtr);        } else if (control_pressed && ksym==XK_r) {            Bool i = !tPtr->flags.rulerShown;             WMShowTextRuler(tPtr, i);            tPtr->flags.rulerShown = i;         }           else if (control_pressed && *buffer == '')             XBell(tPtr->view->screen->display, 0);    else            WMRelayToNextResponder(tPtr->view, event);    }    if (!control_pressed && tPtr->flags.ownsSelection)         releaseSelection(tPtr);}