]> git.eshelyaron.com Git - emacs.git/commitdiff
A better fix for bug #17942.
authorEli Zaretskii <eliz@gnu.org>
Sat, 5 Jul 2014 08:24:07 +0000 (11:24 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 5 Jul 2014 08:24:07 +0000 (11:24 +0300)
 src/xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
 and there is a display property at that position, don't call
 move_it_to to move to a position before window start.

src/ChangeLog
src/xdisp.c

index dde148dc165eaa05140193e346ea61323f91dc8b..a3210b557c78d0bf7a66d2e56a8ffccb56ef5b0a 100644 (file)
@@ -1,8 +1,8 @@
 2014-07-05  Eli Zaretskii  <eliz@gnu.org>
 
-       * xdisp.c (pos_visible_p): If CHARPOS is at BEGV, and there is a
-       display property at BEGV, don't call move_it_to to move to a
-       position before BEGV.  (Bug#17942)
+       * xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
+       and there is a display property at that position, don't call
+       move_it_to to move to a position before window start.  (Bug#17942)
 
 2014-07-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 
index f5ddf8283149d227a0dfa3abc14df57c8d65061b..f49710b21e5a5dc5a59efe305691091db2614ff2 100644 (file)
@@ -1585,7 +1585,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
                  /* Move to the last buffer position before the
                     display property.  */
                  start_display (&it3, w, top);
-                 if (start > BEGV)
+                 if (start > CHARPOS (top))
                    move_it_to (&it3, start - 1, -1, -1, -1, MOVE_TO_POS);
                  /* Move forward one more line if the position before
                     the display string is a newline or if it is the