aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2007-04-10 15:57:25 +0000
committerChong Yidong2007-04-10 15:57:25 +0000
commit796f2ac9859c3487d4285dde0798428c101e1bd9 (patch)
tree626f5e0140232705d7b9aa40e40aa55c8eb367ca /src
parent63a4fc686d68caab09b52921b5dc6cf692062564 (diff)
downloademacs-796f2ac9859c3487d4285dde0798428c101e1bd9.tar.gz
emacs-796f2ac9859c3487d4285dde0798428c101e1bd9.zip
(note_mode_line_or_margin_highlight): Don't decrement glyph pointer
before start of glyph row.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index fd65856c8e5..90977aa3d7d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -22437,7 +22437,7 @@ note_mode_line_or_margin_highlight (window, x, y, area)
22437 22437
22438 Lisp_Object mouse_face; 22438 Lisp_Object mouse_face;
22439 int original_x_pixel = x; 22439 int original_x_pixel = x;
22440 struct glyph * glyph = NULL; 22440 struct glyph * glyph = NULL, * row_start_glyph = NULL;
22441 struct glyph_row *row; 22441 struct glyph_row *row;
22442 22442
22443 if (area == ON_MODE_LINE || area == ON_HEADER_LINE) 22443 if (area == ON_MODE_LINE || area == ON_HEADER_LINE)
@@ -22455,7 +22455,7 @@ note_mode_line_or_margin_highlight (window, x, y, area)
22455 /* Find glyph */ 22455 /* Find glyph */
22456 if (row->mode_line_p && row->enabled_p) 22456 if (row->mode_line_p && row->enabled_p)
22457 { 22457 {
22458 glyph = row->glyphs[TEXT_AREA]; 22458 glyph = row_start_glyph = row->glyphs[TEXT_AREA];
22459 end = glyph + row->used[TEXT_AREA]; 22459 end = glyph + row->used[TEXT_AREA];
22460 22460
22461 for (x0 = original_x_pixel; 22461 for (x0 = original_x_pixel;
@@ -22579,12 +22579,17 @@ note_mode_line_or_margin_highlight (window, x, y, area)
22579 is converted to a flatten by emacs lisp interpreter. 22579 is converted to a flatten by emacs lisp interpreter.
22580 The internal string is an element of the structures. 22580 The internal string is an element of the structures.
22581 The displayed string is the flatten string. */ 22581 The displayed string is the flatten string. */
22582 for (tmp_glyph = glyph - 1, gpos = 0; 22582 gpos = 0;
22583 tmp_glyph->charpos >= XINT (b); 22583 if (glyph > row_start_glyph)
22584 tmp_glyph--, gpos++)
22585 { 22584 {
22586 if (!EQ (tmp_glyph->object, glyph->object)) 22585 tmp_glyph = glyph - 1;
22587 break; 22586 while (tmp_glyph >= row_start_glyph
22587 && tmp_glyph->charpos >= XINT (b)
22588 && EQ (tmp_glyph->object, glyph->object))
22589 {
22590 tmp_glyph--;
22591 gpos++;
22592 }
22588 } 22593 }
22589 22594
22590 /* Calculate the lenght(glyph sequence length: GSEQ_LENGTH) of 22595 /* Calculate the lenght(glyph sequence length: GSEQ_LENGTH) of