comparison src/xdisp.c @ 103601:c466fe42acdc

* xdisp.c (mouse_face_from_buffer_pos): Fix detection of truncation glyphs (Bug#3686).
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 27 Jun 2009 03:50:23 +0000
parents b3c1a923f213
children f9fb01c67183
comparison
equal deleted inserted replaced
103600:02bc348744ed 103601:c466fe42acdc
22989 dpyinfo->mouse_face_beg_y = row->y; 22989 dpyinfo->mouse_face_beg_y = row->y;
22990 dpyinfo->mouse_face_beg_row = MATRIX_ROW_VPOS (row, w->current_matrix); 22990 dpyinfo->mouse_face_beg_row = MATRIX_ROW_VPOS (row, w->current_matrix);
22991 22991
22992 /* Skip truncation glyphs at the start of the glyph row. */ 22992 /* Skip truncation glyphs at the start of the glyph row. */
22993 if (row->displays_text_p) 22993 if (row->displays_text_p)
22994 for (; glyph < end && INTEGERP (glyph->object); ++glyph) 22994 for (; glyph < end
22995 && INTEGERP (glyph->object)
22996 && glyph->charpos < 0;
22997 ++glyph)
22995 x += glyph->pixel_width; 22998 x += glyph->pixel_width;
22996 22999
22997 /* Scan the glyph row, stopping before BEFORE_STRING or 23000 /* Scan the glyph row, stopping before BEFORE_STRING or
22998 DISPLAY_STRING or START_CHARPOS. */ 23001 DISPLAY_STRING or START_CHARPOS. */
22999 for (; glyph < end 23002 for (; glyph < end
23037 dpyinfo->mouse_face_end_y = row->y; 23040 dpyinfo->mouse_face_end_y = row->y;
23038 dpyinfo->mouse_face_end_row = MATRIX_ROW_VPOS (row, w->current_matrix); 23041 dpyinfo->mouse_face_end_row = MATRIX_ROW_VPOS (row, w->current_matrix);
23039 23042
23040 /* Skip truncation glyphs at the start of the row. */ 23043 /* Skip truncation glyphs at the start of the row. */
23041 if (row->displays_text_p) 23044 if (row->displays_text_p)
23042 for (; glyph < end && INTEGERP (glyph->object); ++glyph) 23045 for (; glyph < end
23046 && INTEGERP (glyph->object)
23047 && glyph->charpos < 0;
23048 ++glyph)
23043 x += glyph->pixel_width; 23049 x += glyph->pixel_width;
23044 23050
23045 /* Scan the glyph row, stopping at END_CHARPOS or when we encounter 23051 /* Scan the glyph row, stopping at END_CHARPOS or when we encounter
23046 AFTER_STRING. */ 23052 AFTER_STRING. */
23047 for (; glyph < end 23053 for (; glyph < end