}
else
it_overshoot_count =
- (!(it.method == GET_FROM_IMAGE
- || it.method == GET_FROM_STRETCH)
- /* We will overshoot if lines are truncated and PT lies
- beyond the right margin of the window. */
- || it.line_wrap == TRUNCATE);
+ !(it.method == GET_FROM_IMAGE || it.method == GET_FROM_STRETCH);
if (start_x_given)
{
screen lines we need to backtrack. */
it_overshoot_count = it.vpos;
}
+ /* We will overshoot if lines are truncated and point lies
+ beyond the right margin of the window. */
+ if (it.line_wrap == TRUNCATE && it.current_x >= it.last_visible_x
+ && it_overshoot_count == 0)
+ it_overshoot_count = 1;
if (it_overshoot_count > 0)
move_it_by_lines (&it, -it_overshoot_count);