summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2011-07-15 13:50:03 +0300
committerEli Zaretskii <eliz@gnu.org>2011-07-15 13:50:03 +0300
commitaa4b6df6901fc736db6165f379857f448abbe711 (patch)
treeceaef3fb90bb1dd7a696712ea196f7698457f08a
parent75c68aa1b696fca51177e7777e4aa9838a1b4660 (diff)
downloademacs-aa4b6df6901fc736db6165f379857f448abbe711.tar.gz
Fix vertical cursor motion in Speedbar frames under bidi display.
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.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c16
2 files changed, 21 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 21563806ece..3bb02a71865 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/xdisp.c b/src/xdisp.c
index 69a66a4db64..50da62ca0ab 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -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;
}