diff options
Diffstat (limited to 'src/xdisp.c')
| -rw-r--r-- | src/xdisp.c | 10 |
1 files changed, 8 insertions, 2 deletions
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 |
