diff options
author | Eli Zaretskii <eliz@gnu.org> | 2018-01-19 16:18:41 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2018-01-19 16:18:41 +0200 |
commit | c0154ac7c3423f68d8f3a2e85a756c9759219039 (patch) | |
tree | 720fabe4946a1560636e15050edefc06e3c76c16 /src/dispnew.c | |
parent | 35e4a0def90d2a9b50baac81361c001c85c47e05 (diff) | |
download | emacs-c0154ac7c3423f68d8f3a2e85a756c9759219039.tar.gz |
Fix posn-at-point in Flycheck buffers
* src/dispnew.c (buffer_posn_from_coords): Improve commentary.
* src/xdisp.c (move_it_in_display_line_to): Don't exit the loop
under truncate-lines if the glyph at TO_CHARPOS was not yet
produced. This avoids bailing out too early when we are at
TO_CHARPOS, but didn't yet produce glyphs for that buffer
position, because the last call to PRODUCE_GLYPHS at this position
was for an object other than the buffer. For further details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00537.html.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r-- | src/dispnew.c | 5 |
1 files changed, 5 insertions, 0 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 #ifdef HAVE_WINDOW_SYSTEM if (it.what == IT_IMAGE) { + /* Note that this ignores images that are fringe bitmaps, + because their image ID is zero, and so IMAGE_OPT_FROM_ID will + return NULL. This is okay, since fringe bitmaps are not + displayed in the text area, and so are never the object we + are interested in. */ img = IMAGE_OPT_FROM_ID (it.f, it.image_id); if (img && !NILP (img->spec)) *object = img->spec; |