From: Eli Zaretskii Date: Sun, 14 Aug 2011 11:10:19 +0000 (+0300) Subject: Fix bug #9296 with vertical cursor motion on images. X-Git-Tag: emacs-pretest-24.0.90~104^2~124^2~54 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=daf17d00fb0ed36ed98edd3f9eec9def0ac59f1c;p=emacs.git 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. --- 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)