aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog12
-rw-r--r--src/editfns.c20
-rw-r--r--src/w32term.c16
3 files changed, 39 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 10cc66aceed..eb5db45534f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,15 @@
12014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * w32term.c (x_draw_image_glyph_string): Fix computation of height
4 and width of image background when it is displayed with a 'box'
5 face. (Bug#17115)
6
72014-03-27 Paul Eggert <eggert@penguin.cs.ucla.edu>
8
9 More backward-compatible fix to char-equal core dump (Bug#17011).
10 * editfns.c (Fchar_equal): In unibyte buffers, assume values in
11 range 128-255 are raw bytes. Suggested by Eli Zaretskii.
12
12014-03-27 Juanma Barranquero <lekktu@gmail.com> 132014-03-27 Juanma Barranquero <lekktu@gmail.com>
2 14
3 * image.c (init_svg_functions): When loading SVG-related libraries, 15 * image.c (init_svg_functions): When loading SVG-related libraries,
diff --git a/src/editfns.c b/src/editfns.c
index 1986ee53d23..9c1fcb0b790 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4377,13 +4377,23 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */)
4377 if (NILP (BVAR (current_buffer, case_fold_search))) 4377 if (NILP (BVAR (current_buffer, case_fold_search)))
4378 return Qnil; 4378 return Qnil;
4379 4379
4380 /* FIXME: When enable-multibyte-characters is nil, it's still possible
4381 to manipulate multibyte chars, which means there is a bug for chars
4382 in the range 128-255 as we can't tell whether they are eight-bit
4383 bytes or Latin-1 chars. For now, assume the latter. See Bug#17011.
4384 Also see casefiddle.c's casify_object, which has a similar problem. */
4385 i1 = XFASTINT (c1); 4380 i1 = XFASTINT (c1);
4386 i2 = XFASTINT (c2); 4381 i2 = XFASTINT (c2);
4382
4383 /* FIXME: It is possible to compare multibyte characters even when
4384 the current buffer is unibyte. Unfortunately this is ambiguous
4385 for characters between 128 and 255, as they could be either
4386 eight-bit raw bytes or Latin-1 characters. Assume the former for
4387 now. See Bug#17011, and also see casefiddle.c's casify_object,
4388 which has a similar problem. */
4389 if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
4390 {
4391 if (SINGLE_BYTE_CHAR_P (i1))
4392 i1 = UNIBYTE_TO_CHAR (i1);
4393 if (SINGLE_BYTE_CHAR_P (i2))
4394 i2 = UNIBYTE_TO_CHAR (i2);
4395 }
4396
4387 return (downcase (i1) == downcase (i2) ? Qt : Qnil); 4397 return (downcase (i1) == downcase (i2) ? Qt : Qnil);
4388} 4398}
4389 4399
diff --git a/src/w32term.c b/src/w32term.c
index e8ec99e762d..256d7506a3a 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -2085,10 +2085,14 @@ x_draw_image_glyph_string (struct glyph_string *s)
2085 int x, y; 2085 int x, y;
2086 int box_line_hwidth = eabs (s->face->box_line_width); 2086 int box_line_hwidth = eabs (s->face->box_line_width);
2087 int box_line_vwidth = max (s->face->box_line_width, 0); 2087 int box_line_vwidth = max (s->face->box_line_width, 0);
2088 int height; 2088 int height, width;
2089 HBITMAP pixmap = 0; 2089 HBITMAP pixmap = 0;
2090 2090
2091 height = s->height - 2 * box_line_vwidth; 2091 height = s->height;
2092 if (s->slice.y == 0)
2093 height -= box_line_vwidth;
2094 if (s->slice.y + s->slice.height >= s->img->height)
2095 height -= box_line_vwidth;
2092 2096
2093 /* Fill background with face under the image. Do it only if row is 2097 /* Fill background with face under the image. Do it only if row is
2094 taller than image or if image has a clip mask to reduce 2098 taller than image or if image has a clip mask to reduce
@@ -2101,10 +2105,14 @@ x_draw_image_glyph_string (struct glyph_string *s)
2101 || s->img->pixmap == 0 2105 || s->img->pixmap == 0
2102 || s->width != s->background_width) 2106 || s->width != s->background_width)
2103 { 2107 {
2108 width = s->background_width;
2104 x = s->x; 2109 x = s->x;
2105 if (s->first_glyph->left_box_line_p 2110 if (s->first_glyph->left_box_line_p
2106 && s->slice.x == 0) 2111 && s->slice.x == 0)
2107 x += box_line_hwidth; 2112 {
2113 x += box_line_hwidth;
2114 width -= box_line_hwidth;
2115 }
2108 2116
2109 y = s->y; 2117 y = s->y;
2110 if (s->slice.y == 0) 2118 if (s->slice.y == 0)
@@ -2150,7 +2158,7 @@ x_draw_image_glyph_string (struct glyph_string *s)
2150 } 2158 }
2151 else 2159 else
2152#endif 2160#endif
2153 x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height); 2161 x_draw_glyph_string_bg_rect (s, x, y, width, height);
2154 2162
2155 s->background_filled_p = 1; 2163 s->background_filled_p = 1;
2156 } 2164 }