changeset 90617:2763aeb751dc

(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.
author Kenichi Handa <handa@m17n.org>
date Mon, 16 Oct 2006 07:53:16 +0000
parents 68d59ef20174
children b7ce72709298
files src/xterm.c
diffstat 1 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Mon Oct 16 07:26:53 2006 +0000
+++ b/src/xterm.c	Mon Oct 16 07:53:16 2006 +0000
@@ -1498,14 +1498,15 @@
       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];
-
-	      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);
-	    }
+	    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, 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 @@
 	    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);
 	  }
     }
 }