aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c5
-rw-r--r--src/xdisp.c11
2 files changed, 15 insertions, 1 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 6b39c12f910..56f125218dc 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5214,6 +5214,11 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
5214#ifdef HAVE_WINDOW_SYSTEM 5214#ifdef HAVE_WINDOW_SYSTEM
5215 if (it.what == IT_IMAGE) 5215 if (it.what == IT_IMAGE)
5216 { 5216 {
5217 /* Note that this ignores images that are fringe bitmaps,
5218 because their image ID is zero, and so IMAGE_OPT_FROM_ID will
5219 return NULL. This is okay, since fringe bitmaps are not
5220 displayed in the text area, and so are never the object we
5221 are interested in. */
5217 img = IMAGE_OPT_FROM_ID (it.f, it.image_id); 5222 img = IMAGE_OPT_FROM_ID (it.f, it.image_id);
5218 if (img && !NILP (img->spec)) 5223 if (img && !NILP (img->spec))
5219 *object = img->spec; 5224 *object = img->spec;
diff --git a/src/xdisp.c b/src/xdisp.c
index d2bb47fdabd..fd8aad04121 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -8775,7 +8775,16 @@ move_it_in_display_line_to (struct it *it,
8775 8775
8776 if (it->line_wrap == TRUNCATE) 8776 if (it->line_wrap == TRUNCATE)
8777 { 8777 {
8778 if (BUFFER_POS_REACHED_P ()) 8778 /* If it->pixel_width is zero, the last PRODUCE_GLYPHS call
8779 produced something that doesn't consume any screen estate
8780 in the text area, so we don't want to exit the loop at
8781 TO_CHARPOS, before we produce the glyph for that buffer
8782 position. This happens, e.g., when there's an overlay at
8783 TO_CHARPOS that draws a fringe bitmap. */
8784 if (BUFFER_POS_REACHED_P ()
8785 && (it->pixel_width > 0
8786 || IT_CHARPOS (*it) > to_charpos
8787 || it->area != TEXT_AREA))
8779 { 8788 {
8780 result = MOVE_POS_MATCH_OR_ZV; 8789 result = MOVE_POS_MATCH_OR_ZV;
8781 break; 8790 break;