rem: if(tPtr->editable && tPtr->clheight > 0) { int top = tPtr->cursor.y-tPtr->vpos; int bot = top+tPtr->clheight; if(bot>5) { if(top<5) top=5; if(bot>tPtr->visibleH+hS-2) bot = tPtr->visibleH+hS-2; if(bot-top>1) {  XDrawLine(tPtr->view->screen->display, tPtr->view->window, WMColorGC(tPtr->dColor), lmargin+tPtr->cursor.x, top, lmargin+tPtr->cursor.x, bot); } } }
add: if (tPtr->editable && tPtr->clheight > 0) { int top = tPtr->cursor.y - tPtr->vpos; int bot = top + tPtr->clheight;
context: paintText(Text *tPtr){    short lmargin, para_lmargin;    int from=5, to=5, height;    Paragraph *para;    short vS=0, hS=0, rh=0;    if(!tPtr->view->flags.realized) return;    if(tPtr->rulerShown) rh = 40;    to += rh;    if(tPtr->hasVscroller) vS = 21;    if(tPtr->hasHscroller) hS = 21;    //XClearWindow(tPtr->view->screen->display, tPtr->view->window);    lmargin = WMGetRulerMargin(tPtr->ruler, WRulerDocLeft);    if(tPtr->paragraphs) {        para = tPtr->paragraphs;        while(para) {            if(para->drawbuffer) {                from = (para->top<=tPtr->vpos)?tPtr->vpos-para->top:0;                height = para->height - from;                if(from>=0 && height>0 ) {                    para_lmargin = WMIN(para->fmargin, para->bmargin);                    if(lmargin-vS<WMIN(para->fmargin, para->bmargin)) {#if 0                        XClearArea(tPtr->view->screen->display, tPtr->view->window,                                   lmargin, to, 2+para_lmargin, height, False);#else                        XFillRectangle(tPtr->view->screen->display, tPtr->view->window,                                       WMColorGC(tPtr->dColor), lmargin, to, 2+para_lmargin, height);#endif                    }                    XCopyArea(tPtr->view->screen->display, para->drawbuffer,                              tPtr->view->window, WMColorGC(tPtr->bg), 0, from,                              para->width-4, height, lmargin+para_lmargin+2, to);                    if( (to+=height) > tPtr->visibleH+rh)                        break;                } 	}            para = para->next;        }	}#if 0    /* clear any left over space (esp. during para deletes/ ruler changes) */    if(tPtr->docHeight < tPtr->visibleH && tPtr->visibleH+rh+5-to>0) {        XClearArea(tPtr->view->screen->display, tPtr->view->window, vS, to,                   tPtr->view->size.width-vS, tPtr->visibleH+rh+hS+5-to, False);    }    if(lmargin>vS)        XClearArea(tPtr->view->screen->display, tPtr->view->window,                   vS+1, rh+5, lmargin-vS, tPtr->visibleH+rh+5-vS, False);    // from the "selection" days...    W_DrawRelief(tPtr->view->screen, WMWidgetXID(tPtr),                 tPtr->sRect.pos.x, tPtr->sRect.pos.y,                 tPtr->sRect.size.width, tPtr->sRect.size.height, tPtr->relief);#endif    W_DrawRelief(tPtr->view->screen, WMWidgetXID(tPtr), 0, rh,                 tPtr->visibleW+vS, tPtr->visibleH+hS, tPtr->relief);    if(tPtr->editable && tPtr->clheight > 0) {        int top = tPtr->cursor.y-tPtr->vpos;        int bot = top+tPtr->clheight;        if(bot>5) {            if(top<5) top=5;            if(bot>tPtr->visibleH+hS-2) bot = tPtr->visibleH+hS-2;            if(bot-top>1) {                //do something about italic text...                XDrawLine(tPtr->view->screen->display, tPtr->view->window,                          WMColorGC(tPtr->dColor), lmargin+tPtr->cursor.x, top,                          lmargin+tPtr->cursor.x, bot);            } } }}