From daf17d00fb0ed36ed98edd3f9eec9def0ac59f1c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 14 Aug 2011 14:10:19 +0300 Subject: [PATCH] Fix bug #9296 with vertical cursor motion on images. src/xdisp.c (move_it_in_display_line_to): Don't invoke IT_RESET_X_ASCENT_DESCENT when iterator position was restored from ppos_it. Fixes vertical cursor motion when line beginning is covered by an image. --- src/ChangeLog | 7 +++++++ src/xdisp.c | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b0a0e03a8a7..b5da1be5c7d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-08-14 Eli Zaretskii + + * xdisp.c (move_it_in_display_line_to): Don't invoke + IT_RESET_X_ASCENT_DESCENT when iterator position was restored from + ppos_it. Fixes vertical cursor motion when line beginning is + covered by an image. (Bug#9296) + 2011-08-14 Jan Djärv * nsterm.h (ns_run_ascript): Declare. diff --git a/src/xdisp.c b/src/xdisp.c index a3bdcbdf4c6..ff3f55bef25 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8037,8 +8037,12 @@ move_it_in_display_line_to (struct it *it, 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; + { + RESTORE_IT (it, &ppos_it, ppos_data); + result = MOVE_POS_MATCH_OR_ZV; + } + else + goto buffer_pos_reached; } else if (it->line_wrap == WORD_WRAP && atpos_it.sp >= 0 && IT_CHARPOS (*it) > to_charpos) -- 2.39.2