Fix posn-at-point in Flycheck buffers
commitc0154ac7c3423f68d8f3a2e85a756c9759219039
authorEli Zaretskii <eliz@gnu.org>
Fri, 19 Jan 2018 14:18:41 +0000 (19 16:18 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 19 Jan 2018 14:18:41 +0000 (19 16:18 +0200)
tree720fabe4946a1560636e15050edefc06e3c76c16
parent35e4a0def90d2a9b50baac81361c001c85c47e05
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.
src/dispnew.c
src/xdisp.c