diff options
| author | Kim F. Storm | 2006-04-24 00:08:07 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-04-24 00:08:07 +0000 |
| commit | 536fde8e097a9446bf79d878c60f0f8fd3cbd16e (patch) | |
| tree | d9088afa7c9ffb192dbff492ac4fbd0af2e58d9a /src | |
| parent | e8a0da872aabbe347307a03620e882c274f862e2 (diff) | |
| download | emacs-536fde8e097a9446bf79d878c60f0f8fd3cbd16e.tar.gz emacs-536fde8e097a9446bf79d878c60f0f8fd3cbd16e.zip | |
(produce_stretch_glyph): Include face box in stretch glyph size.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 42 |
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) | |||
| 19865 | && it->current_x + width > it->last_visible_x) | 19865 | && it->current_x + width > it->last_visible_x) |
| 19866 | width = it->last_visible_x - it->current_x - 1; | 19866 | width = it->last_visible_x - it->current_x - 1; |
| 19867 | 19867 | ||
| 19868 | if (width > 0 && height > 0 && it->glyph_row) | 19868 | if (width > 0 && height > 0) |
| 19869 | { | 19869 | { |
| 19870 | Lisp_Object object = it->stack[it->sp - 1].string; | 19870 | |
| 19871 | if (!STRINGP (object)) | 19871 | if (face->box != FACE_NO_BOX && face->box_line_width != 0) |
| 19872 | object = it->w->buffer; | 19872 | { |
| 19873 | append_stretch_glyph (it, object, width, height, ascent); | 19873 | if (face->box_line_width > 0) |
| 19874 | { | ||
| 19875 | ascent += face->box_line_width; | ||
| 19876 | height += face->box_line_width * 2; | ||
| 19877 | } | ||
| 19878 | |||
| 19879 | if (it->start_of_box_run_p) | ||
| 19880 | width += abs (face->box_line_width); | ||
| 19881 | if (it->end_of_box_run_p) | ||
| 19882 | width += abs (face->box_line_width); | ||
| 19883 | } | ||
| 19884 | |||
| 19885 | if (it->glyph_row) | ||
| 19886 | { | ||
| 19887 | Lisp_Object object = it->stack[it->sp - 1].string; | ||
| 19888 | if (!STRINGP (object)) | ||
| 19889 | object = it->w->buffer; | ||
| 19890 | append_stretch_glyph (it, object, width, height, ascent); | ||
| 19891 | } | ||
| 19874 | } | 19892 | } |
| 19875 | 19893 | ||
| 19876 | it->pixel_width = width; | 19894 | it->pixel_width = width; |
| @@ -19878,20 +19896,6 @@ produce_stretch_glyph (it) | |||
| 19878 | it->descent = it->phys_descent = height - it->ascent; | 19896 | it->descent = it->phys_descent = height - it->ascent; |
| 19879 | it->nglyphs = width > 0 && height > 0 ? 1 : 0; | 19897 | it->nglyphs = width > 0 && height > 0 ? 1 : 0; |
| 19880 | 19898 | ||
| 19881 | if (width > 0 && height > 0 && face->box != FACE_NO_BOX) | ||
| 19882 | { | ||
| 19883 | if (face->box_line_width > 0) | ||
| 19884 | { | ||
| 19885 | it->ascent += face->box_line_width; | ||
| 19886 | it->descent += face->box_line_width; | ||
| 19887 | } | ||
| 19888 | |||
| 19889 | if (it->start_of_box_run_p) | ||
| 19890 | it->pixel_width += abs (face->box_line_width); | ||
| 19891 | if (it->end_of_box_run_p) | ||
| 19892 | it->pixel_width += abs (face->box_line_width); | ||
| 19893 | } | ||
| 19894 | |||
| 19895 | take_vertical_position_into_account (it); | 19899 | take_vertical_position_into_account (it); |
| 19896 | } | 19900 | } |
| 19897 | 19901 | ||