]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #17944 with pos-visible-in-window-p when there's image at window start.
authorEli Zaretskii <eliz@gnu.org>
Sat, 5 Jul 2014 09:53:50 +0000 (12:53 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 5 Jul 2014 09:53:50 +0000 (12:53 +0300)
 src/xdisp.c (pos_visible_p):  Fix condition for finding CHARPOS by the
 first call to move_it_to.

src/ChangeLog
src/xdisp.c

index a3210b557c78d0bf7a66d2e56a8ffccb56ef5b0a..89621bd54ec3eea09818b2c7ee162ba35c4ecbe8 100644 (file)
@@ -3,6 +3,8 @@
        * 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)
+       Fix condition for finding CHARPOS by the first call to move_it_to.
+       (Bug#17944)
 
 2014-07-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 
index f49710b21e5a5dc5a59efe305691091db2614ff2..913b57ed44be94aad243b9c9290b2df9e7729ee8 100644 (file)
@@ -1436,7 +1436,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
              (charpos >= 0 ? MOVE_TO_POS : 0) | MOVE_TO_Y);
 
   if (charpos >= 0
-      && (((!it.bidi_p || it.bidi_it.scan_dir == 1)
+      && (((!it.bidi_p || it.bidi_it.scan_dir != -1)
           && IT_CHARPOS (it) >= charpos)
          /* When scanning backwards under bidi iteration, move_it_to
             stops at or _before_ CHARPOS, because it stops at or to