From 4bad3dc5dff0cfa199127f9bbbd4c62c3b572f38 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 16 Oct 2006 07:53:16 +0000 Subject: [PATCH] (x_draw_composite_glyph_string_foreground): Don't draw TAB. Adjusted for the change of s->char2b which always points to the first elememnt of allocated memory. --- src/xterm.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 856fbef435b..ccc41810289 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1498,14 +1498,15 @@ x_draw_composite_glyph_string_foreground (s) else { for (i = 0; i < s->nchars; i++, ++s->gidx) - { - int xx = x + s->cmp->offsets[s->gidx * 2]; - int yy = y - s->cmp->offsets[s->gidx * 2 + 1]; + if (COMPOSITION_GLYPH (s->cmp, s->gidx) != '\t') + { + int xx = x + s->cmp->offsets[s->gidx * 2]; + int yy = y - s->cmp->offsets[s->gidx * 2 + 1]; - font->driver->draw (s, i, i + 1, xx, yy, 0); - if (s->face->overstrike) - font->driver->draw (s, i, i + 1, xx + 1, yy, 0); - } + font->driver->draw (s, s->gidx, s->gidx + 1, xx, yy, 0); + if (s->face->overstrike) + font->driver->draw (s, s->gidx, s->gidx + 1, xx + 1, yy, 0); + } } } #endif /* USE_FONT_BACKEND */ @@ -1517,12 +1518,12 @@ x_draw_composite_glyph_string_foreground (s) XDrawString16 (s->display, s->window, s->gc, x + s->cmp->offsets[s->gidx * 2], s->ybase - s->cmp->offsets[s->gidx * 2 + 1], - s->char2b + i, 1); + s->char2b + s->gidx, 1); if (s->face->overstrike) XDrawString16 (s->display, s->window, s->gc, x + s->cmp->offsets[s->gidx * 2] + 1, s->ybase - s->cmp->offsets[s->gidx * 2 + 1], - s->char2b + i, 1); + s->char2b + s->gidx, 1); } } } -- 2.39.5