From: Chong Yidong Date: Sat, 27 Jun 2009 03:50:23 +0000 (+0000) Subject: * xdisp.c (mouse_face_from_buffer_pos): Fix detection of X-Git-Tag: emacs-pretest-23.1.90~2414 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cd9b5e16ff0bd343bd268c4fe2cb41f3a952a2f4;p=emacs.git * xdisp.c (mouse_face_from_buffer_pos): Fix detection of truncation glyphs (Bug#3686). --- diff --git a/src/ChangeLog b/src/ChangeLog index 2572c3ea13e..65cd4fa62b6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,10 +1,15 @@ +2009-06-27 Chong Yidong + + * xdisp.c (mouse_face_from_buffer_pos): Fix detection of + truncation glyphs (Bug#3686). + 2009-06-27 Glenn Morris * m/pmax.h: Restore file, with only netbsd portions. 2009-06-26 David Reitter - * nsterm.m (keydown): avoid infinite loop + * nsterm.m (keydown): Avoid infinite loop. 2009-06-26 Peter Jolly (tiny change) diff --git a/src/xdisp.c b/src/xdisp.c index 68f2a4fc7b0..5fc634b20ea 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -22991,7 +22991,10 @@ mouse_face_from_buffer_pos (Lisp_Object window, /* Skip truncation glyphs at the start of the glyph row. */ if (row->displays_text_p) - for (; glyph < end && INTEGERP (glyph->object); ++glyph) + for (; glyph < end + && INTEGERP (glyph->object) + && glyph->charpos < 0; + ++glyph) x += glyph->pixel_width; /* Scan the glyph row, stopping before BEFORE_STRING or @@ -23039,7 +23042,10 @@ mouse_face_from_buffer_pos (Lisp_Object window, /* Skip truncation glyphs at the start of the row. */ if (row->displays_text_p) - for (; glyph < end && INTEGERP (glyph->object); ++glyph) + for (; glyph < end + && INTEGERP (glyph->object) + && glyph->charpos < 0; + ++glyph) x += glyph->pixel_width; /* Scan the glyph row, stopping at END_CHARPOS or when we encounter