diff options
Diffstat (limited to 'contrib/groff/src/xditview/draw.c')
-rw-r--r-- | contrib/groff/src/xditview/draw.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/groff/src/xditview/draw.c b/contrib/groff/src/xditview/draw.c index 69e86cd..fe7c80f 100644 --- a/contrib/groff/src/xditview/draw.c +++ b/contrib/groff/src/xditview/draw.c @@ -68,9 +68,9 @@ AdjustCacheDeltas (dw) for (i = 0; i <= dw->dvi.cache.index; i++) if (dw->dvi.cache.adjustable[i]) ++nadj; - if (nadj == 0) - return; dw->dvi.text_x_width += extra; + if (nadj <= 1) + return; for (i = 0; i <= dw->dvi.cache.index; i++) if (dw->dvi.cache.adjustable[i]) { int x; @@ -181,6 +181,7 @@ DoCharacter (dw, c, wid) || dw->dvi.cache.char_index >= DVI_CHAR_CACHE_SIZE) { FlushCharCache (dw); x = dw->dvi.cache.x; + dw->dvi.cache.adjustable[dw->dvi.cache.index] = 0; } /* * load a new font, if the current block is not empty, @@ -189,6 +190,8 @@ DoCharacter (dw, c, wid) if (dw->dvi.cache.font_size != dw->dvi.state->font_size || dw->dvi.cache.font_number != dw->dvi.state->font_number) { + FlushCharCache (dw); + x = dw->dvi.cache.x; dw->dvi.cache.font_size = dw->dvi.state->font_size; dw->dvi.cache.font_number = dw->dvi.state->font_number; dw->dvi.cache.font = QueryFont (dw, @@ -208,6 +211,7 @@ DoCharacter (dw, c, wid) if (dw->dvi.cache.index >= dw->dvi.cache.max) FlushCharCache (dw); dw->dvi.cache.cache[dw->dvi.cache.index].nchars = 0; + dw->dvi.cache.adjustable[dw->dvi.cache.index] = 0; } dw->dvi.cache.adjustable[dw->dvi.cache.index] = dw->dvi.word_flag; |