aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-08-19 07:28:36 -0700
committerPaul Eggert2011-08-19 07:28:36 -0700
commitfe4496a6e27ac892283b8568adbd12831868cc54 (patch)
tree36242f11ad8079d1e0a00b465c953777200c00ff /src
parent51f30bc52daf551f3c433b80f598eb52dca71033 (diff)
parent823564e519dd1f3e81a79949e1abc033c9e7c0a5 (diff)
downloademacs-fe4496a6e27ac892283b8568adbd12831868cc54.tar.gz
emacs-fe4496a6e27ac892283b8568adbd12831868cc54.zip
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog11
-rw-r--r--src/xdisp.c19
-rw-r--r--src/xfaces.c15
3 files changed, 36 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 1db99549c60..922a8a33a9c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -422,6 +422,17 @@
422 (gs_load): Use printmax_t to print the widest integers possible. 422 (gs_load): Use printmax_t to print the widest integers possible.
423 Check for integer overflow when computing image height and width. 423 Check for integer overflow when computing image height and width.
424 424
4252011-08-19 Eli Zaretskii <eliz@gnu.org>
426
427 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
428 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
429 from an Org mode buffer to a Speedbar frame.
430
431 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
432 a composition, take its buffer position from IT->cmp_it.charpos.
433 Fixes cursor positioning at the beginning of a line that begins
434 with a composed character.
435
4252011-08-18 Eli Zaretskii <eliz@gnu.org> 4362011-08-18 Eli Zaretskii <eliz@gnu.org>
426 437
427 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the 438 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
diff --git a/src/xdisp.c b/src/xdisp.c
index ea70c916762..86ad523dfdd 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -18384,15 +18384,22 @@ display_line (struct it *it)
18384#define RECORD_MAX_MIN_POS(IT) \ 18384#define RECORD_MAX_MIN_POS(IT) \
18385 do \ 18385 do \
18386 { \ 18386 { \
18387 if (IT_CHARPOS (*(IT)) < min_pos) \ 18387 int composition_p = (IT)->what == IT_COMPOSITION; \
18388 EMACS_INT current_pos = \
18389 composition_p ? (IT)->cmp_it.charpos \
18390 : IT_CHARPOS (*(IT)); \
18391 EMACS_INT current_bpos = \
18392 composition_p ? CHAR_TO_BYTE (current_pos) \
18393 : IT_BYTEPOS (*(IT)); \
18394 if (current_pos < min_pos) \
18388 { \ 18395 { \
18389 min_pos = IT_CHARPOS (*(IT)); \ 18396 min_pos = current_pos; \
18390 min_bpos = IT_BYTEPOS (*(IT)); \ 18397 min_bpos = current_bpos; \
18391 } \ 18398 } \
18392 if (IT_CHARPOS (*(IT)) > max_pos) \ 18399 if (current_pos > max_pos) \
18393 { \ 18400 { \
18394 max_pos = IT_CHARPOS (*(IT)); \ 18401 max_pos = current_pos; \
18395 max_bpos = IT_BYTEPOS (*(IT)); \ 18402 max_bpos = current_bpos; \
18396 } \ 18403 } \
18397 } \ 18404 } \
18398 while (0) 18405 while (0)
diff --git a/src/xfaces.c b/src/xfaces.c
index fee4a6f9d6a..431ca07b8df 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -5999,9 +5999,18 @@ face_at_buffer_position (struct window *w, EMACS_INT pos,
5999 5999
6000 *endptr = endpos; 6000 *endptr = endpos;
6001 6001
6002 default_face = FACE_FROM_ID (f, base_face_id >= 0 ? base_face_id 6002 {
6003 : NILP (Vface_remapping_alist) ? DEFAULT_FACE_ID 6003 int face_id;
6004 : lookup_basic_face (f, DEFAULT_FACE_ID)); 6004
6005 if (base_face_id >= 0)
6006 face_id = base_face_id;
6007 else if (NILP (Vface_remapping_alist))
6008 face_id = DEFAULT_FACE_ID;
6009 else
6010 face_id = lookup_basic_face (f, DEFAULT_FACE_ID);
6011
6012 default_face = FACE_FROM_ID (f, face_id);
6013 }
6005 6014
6006 /* Optimize common cases where we can use the default face. */ 6015 /* Optimize common cases where we can use the default face. */
6007 if (noverlays == 0 6016 if (noverlays == 0