summaryrefslogtreecommitdiff
path: root/src/xdisp.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2008-02-25 01:52:35 +0000
committerKenichi Handa <handa@m17n.org>2008-02-25 01:52:35 +0000
commitae185452070444d89db7f1069c58cfa27a5e15b0 (patch)
tree27bfe2dbcb22547206d8dcdf3c23f364f0b62679 /src/xdisp.c
parentde63f07f8151e740edf0db7bff142cd863820071 (diff)
downloademacs-ae185452070444d89db7f1069c58cfa27a5e15b0.tar.gz
(struct glyph_string): New member padding_p.
Diffstat (limited to 'src/xdisp.c')
-rw-r--r--src/xdisp.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 588d145e9e1..1e2a667330e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19409,7 +19409,7 @@ fill_glyph_string (s, face_id, start, end, overlaps)
glyph = s->row->glyphs[s->area] + start;
last = s->row->glyphs[s->area] + end;
voffset = glyph->voffset;
-
+ s->padding_p = glyph->padding_p;
glyph_not_available_p = glyph->glyph_not_available_p;
while (glyph < last
@@ -19428,7 +19428,8 @@ fill_glyph_string (s, face_id, start, end, overlaps)
++s->nchars;
xassert (s->nchars <= end - start);
s->width += glyph->pixel_width;
- ++glyph;
+ if (glyph++->padding_p != s->padding_p)
+ break;
}
s->font = s->face->font;
@@ -20181,7 +20182,18 @@ append_glyph (it)
{
glyph->charpos = CHARPOS (it->position);
glyph->object = it->object;
- glyph->pixel_width = it->pixel_width;
+ if (it->pixel_width > 0)
+ {
+ glyph->pixel_width = it->pixel_width;
+ glyph->padding_p = 0;
+ }
+ else
+ {
+ /* Assure at least 1-pixel width. Otherwise, cursor can't
+ be displayed correctly. */
+ glyph->pixel_width = 1;
+ glyph->padding_p = 1;
+ }
glyph->ascent = it->ascent;
glyph->descent = it->descent;
glyph->voffset = it->voffset;
@@ -20191,7 +20203,6 @@ append_glyph (it)
glyph->right_box_line_p = it->end_of_box_run_p;
glyph->overlaps_vertically_p = (it->phys_ascent > it->ascent
|| it->phys_descent > it->descent);
- glyph->padding_p = 0;
glyph->glyph_not_available_p = it->glyph_not_available_p;
glyph->face_id = it->face_id;
glyph->u.ch = it->char_to_display;