Commit 979022ef authored by Eli Zaretskii's avatar Eli Zaretskii

Fix bug #11063 with move_it_by_lines when there's a before-string at bol.

 src/xdisp.c (move_it_by_lines): When DVPOS is positive, and the
 position we get to after a call to move_it_to fails the
 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
 only if we wind up in a string from display property.
parent a6b1c7cc
2012-03-31 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (move_it_by_lines): When DVPOS is positive, and the
position we get to after a call to move_it_to fails the
IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
only if we wind up in a string from display property. (Bug#11063)
* window.c (Fdelete_other_windows_internal): Invalidate the row
and column information about mouse highlight, so that redisplay
restores it after reallocating the glyph matrices. (Bug#7464)
......
......@@ -8973,7 +8973,20 @@ move_it_by_lines (struct it *it, int dvpos)
{
move_it_to (it, -1, -1, -1, it->vpos + dvpos, MOVE_TO_VPOS);
if (!IT_POS_VALID_AFTER_MOVE_P (it))
move_it_to (it, IT_CHARPOS (*it) + 1, -1, -1, -1, MOVE_TO_POS);
{
/* Only move to the next buffer position if we ended up in a
string from display property, not in an overlay string
(before-string or after-string). That is because the
latter don't conceal the underlying buffer position, so
we can ask to move the iterator to the exact position we
are interested in. Note that, even if we are already at
IT_CHARPOS (*it), the call below is not a no-op, as it
will detect that we are at the end of the string, pop the
iterator, and compute it->current_x and it->hpos
correctly. */
move_it_to (it, IT_CHARPOS (*it) + it->string_from_display_prop_p,
-1, -1, -1, MOVE_TO_POS);
}
}
else
{
......
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