rem: tPtr->docWidth = WMGetRulerMargin(tPtr->ruler, WRulerRight) - WMGetRulerMargin(tPtr->ruler, WRulerDocLeft);
add: tPtr->docWidth = WMGetRulerMargins(tPtr->ruler, WRulerRight) - WMGetRulerMargins(tPtr->ruler, WRulerDocLeft);
context: calcDocExtents(Text *tPtr){    Paragraph *para;    if(tPtr->monoFont) {        tPtr->docWidth = tPtr->visibleW;    } else {        tPtr->docWidth = WMGetRulerMargin(tPtr->ruler, WRulerRight) -            WMGetRulerMargin(tPtr->ruler, WRulerDocLeft);    }    tPtr->docHeight = 0;    para = tPtr->paragraphs;    if(para) {        while(para) {            para->top = tPtr->docHeight;            tPtr->docHeight += calcParaExtents(tPtr, para);            para->bottom = tPtr->docHeight;            para = para->next;        }    } else { /* default to this if no paragraphs */        tPtr->docHeight = tPtr->dFont->height;    }#if 0    if(tPtr->editable) /* add space at bottom to enter new stuff */        tPtr->docHeight += tPtr->dFont->height;#endif}