summaryrefslogtreecommitdiff
path: root/src/xdisp.c
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2006-04-24 00:08:07 +0000
committerKim F. Storm <storm@cua.dk>2006-04-24 00:08:07 +0000
commit536fde8e097a9446bf79d878c60f0f8fd3cbd16e (patch)
treed9088afa7c9ffb192dbff492ac4fbd0af2e58d9a /src/xdisp.c
parente8a0da872aabbe347307a03620e882c274f862e2 (diff)
downloademacs-536fde8e097a9446bf79d878c60f0f8fd3cbd16e.tar.gz
(produce_stretch_glyph): Include face box in stretch glyph size.
Diffstat (limited to 'src/xdisp.c')
-rw-r--r--src/xdisp.c42
1 files changed, 23 insertions, 19 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 131ce4b04d9..9c9031fa443 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19865,12 +19865,30 @@ produce_stretch_glyph (it)
&& it->current_x + width > it->last_visible_x)
width = it->last_visible_x - it->current_x - 1;
- if (width > 0 && height > 0 && it->glyph_row)
+ if (width > 0 && height > 0)
{
- Lisp_Object object = it->stack[it->sp - 1].string;
- if (!STRINGP (object))
- object = it->w->buffer;
- append_stretch_glyph (it, object, width, height, ascent);
+
+ if (face->box != FACE_NO_BOX && face->box_line_width != 0)
+ {
+ if (face->box_line_width > 0)
+ {
+ ascent += face->box_line_width;
+ height += face->box_line_width * 2;
+ }
+
+ if (it->start_of_box_run_p)
+ width += abs (face->box_line_width);
+ if (it->end_of_box_run_p)
+ width += abs (face->box_line_width);
+ }
+
+ if (it->glyph_row)
+ {
+ Lisp_Object object = it->stack[it->sp - 1].string;
+ if (!STRINGP (object))
+ object = it->w->buffer;
+ append_stretch_glyph (it, object, width, height, ascent);
+ }
}
it->pixel_width = width;
@@ -19878,20 +19896,6 @@ produce_stretch_glyph (it)
it->descent = it->phys_descent = height - it->ascent;
it->nglyphs = width > 0 && height > 0 ? 1 : 0;
- if (width > 0 && height > 0 && face->box != FACE_NO_BOX)
- {
- if (face->box_line_width > 0)
- {
- it->ascent += face->box_line_width;
- it->descent += face->box_line_width;
- }
-
- if (it->start_of_box_run_p)
- it->pixel_width += abs (face->box_line_width);
- if (it->end_of_box_run_p)
- it->pixel_width += abs (face->box_line_width);
- }
-
take_vertical_position_into_account (it);
}