add: } else if(tb->graphic) { Bool hasNext = (Bool)(tb->next);  WMDestroyTextBlock(tPtr, WMRemoveTextBlock(tPtr)); if(hasNext) { tPtr->tpos = 0; } else if(tPtr->currentTextBlock) { tPtr->tpos = (tPtr->currentTextBlock->graphic? 1 : tPtr->currentTextBlock->used); } } else printf("DEBUG: unaccounted for... catch this!\n");
context: deleteTextInteractively(Text *tPtr, KeySym ksym){    TextBlock *tb;    Bool back = (Bool) (ksym == XK_BackSpace);    Bool done = 1, wasFirst = 0;    if (!tPtr->flags.editable)         return;    if ( !(tb = tPtr->currentTextBlock) )        return;    if (tPtr->flags.ownsSelection) {        if(removeSelection(tPtr))            layOutDocument(tPtr);        return;    }    wasFirst = tb->first;    if (back && tPtr->tpos < 1) {        if (tb->prior) {            if(tb->prior->blank) {                 tPtr->currentTextBlock = tb->prior;                WMRemoveTextBlock(tPtr);                tPtr->currentTextBlock = tb;                tb->first = True;                layOutDocument(tPtr);                return;            } else {                if(tb->blank) {                    TextBlock *prior = tb->prior;                    tPtr->currentTextBlock = tb;                    WMRemoveTextBlock(tPtr);                    tb = prior;                } else {                   tb = tb->prior;                    }                tPtr->tpos = tb->used;                tPtr->currentTextBlock = tb;                done = 1;                if(wasFirst) {                    if(tb->next)                         tb->next->first = False;                    layOutDocument(tPtr);                    return;                }            }        }    }    if ( (tb->used > 0) &&  ((back?tPtr->tpos > 0:1))        && (tPtr->tpos <= tb->used) && !tb->graphic) {        if (back)            tPtr->tpos--;        memmove(&(tb->text[tPtr->tpos]),            &(tb->text[tPtr->tpos + 1]), tb->used - tPtr->tpos);        tb->used--;        done = 0;    }    /* if there are no characters left to back over in the textblock,        but it still has characters to the right of the cursor: */    if ( (back? (tPtr->tpos == 0 && !done) : ( tPtr->tpos >= tb->used))        || tb->graphic) {        /* no more chars, and it's marked as blank? */        if(tb->blank) {            TextBlock *sibling = (back? tb->prior : tb->next);            if(tb->used == 0 || tb->graphic)                 WMDestroyTextBlock(tPtr, WMRemoveTextBlock(tPtr));            if (sibling) {                 tPtr->currentTextBlock = sibling;                tPtr->tpos = (back? sibling->used : 0);            }        /* no more chars, so mark it as blank */        } else if(tb->used == 0)             tb->blank = 1;    }    layOutDocument(tPtr);}