]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix vertical cursor motion in Speedbar frames under bidi display.
authorEli Zaretskii <eliz@gnu.org>
Fri, 15 Jul 2011 10:50:03 +0000 (13:50 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 15 Jul 2011 10:50:03 +0000 (13:50 +0300)
 src/xdisp.c (move_it_in_display_line_to): Fix vertical motion with
 bidi redisplay when a line includes both an image and is
 truncated.

src/ChangeLog
src/xdisp.c

index 21563806eceb3e9ab2a05c411299eb704a539458..3bb02a718658d3569f44c0df715217f5203b328b 100644 (file)
@@ -1,3 +1,9 @@
+2011-07-15  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
+       bidi redisplay when a line includes both an image and is
+       truncated.
+
 2011-07-14  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix minor problems found by static checking.
index 69a66a4db64a5bb887f2b82da2acb02ef4d64263..50da62ca0ab3a0a3c730c88ffb115d9e79e7ef25 100644 (file)
@@ -7928,7 +7928,14 @@ move_it_in_display_line_to (struct it *it,
              || IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
            {
              if (!get_next_display_element (it)
-                 || BUFFER_POS_REACHED_P ())
+                 || BUFFER_POS_REACHED_P ()
+                 /* If we are past TO_CHARPOS, but never saw any
+                    character positions smaller than TO_CHARPOS,
+                    return MOVE_POS_MATCH_OR_ZV, like the
+                    unidirectional display did.  */
+                 || ((op & MOVE_TO_POS) != 0
+                     && !saw_smaller_pos
+                     && IT_CHARPOS (*it) > to_charpos))
                {
                  result = MOVE_POS_MATCH_OR_ZV;
                  break;
@@ -7939,6 +7946,13 @@ move_it_in_display_line_to (struct it *it,
                  break;
                }
            }
+         else if ((op & MOVE_TO_POS) != 0
+                  && !saw_smaller_pos
+                  && IT_CHARPOS (*it) > to_charpos)
+           {
+             result = MOVE_POS_MATCH_OR_ZV;
+             break;
+           }
          result = MOVE_LINE_TRUNCATED;
          break;
        }