Commit 75b771e4 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Really fix bug #9224 with vertical-motion under word-wrap.

 src/xdisp.c (move_it_in_display_line_to): Fix vertical-motion in a buffer
 with word-wrap under bidirectional display.
parent d1410150
......@@ -3,6 +3,8 @@
* xdisp.c (set_cursor_from_row): Fix cursor positioning when a
display property strides EOL and includes a newline, as in
longlines-mode. (Bug#9254)
(move_it_in_display_line_to): Fix vertical-motion in a buffer with
word-wrap under bidirectional display. (Bug#9224)
* bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
is non-zero, even if the data buffer is NULL. Fixes a crash in
......
......@@ -8009,13 +8009,19 @@ move_it_in_display_line_to (struct it *it,
positions smaller than TO_CHARPOS, return
MOVE_POS_MATCH_OR_ZV, like the unidirectional display
did. */
if (it->bidi_p && (op & MOVE_TO_POS) != 0
&& !saw_smaller_pos
&& IT_CHARPOS (*it) > to_charpos)
if (it->bidi_p && (op & MOVE_TO_POS) != 0)
{
if (IT_CHARPOS (ppos_it) < ZV)
RESTORE_IT (it, &ppos_it, ppos_data);
goto buffer_pos_reached;
if (!saw_smaller_pos && IT_CHARPOS (*it) > to_charpos)
{
if (IT_CHARPOS (ppos_it) < ZV)
RESTORE_IT (it, &ppos_it, ppos_data);
goto buffer_pos_reached;
}
else if (it->line_wrap == WORD_WRAP && atpos_it.sp >= 0
&& IT_CHARPOS (*it) > to_charpos)
goto buffer_pos_reached;
else
result = MOVE_NEWLINE_OR_CR;
}
else
result = MOVE_NEWLINE_OR_CR;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment