aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2012-05-19 15:14:11 +0300
committerEli Zaretskii2012-05-19 15:14:11 +0300
commit44e27368281d4078a83c55003454d76683ddaad4 (patch)
tree018b28804a9e191f149545f4f13e52a644e9b5dc /src
parentf467fdc6f924765fde80ac50da08e8a49ad191eb (diff)
downloademacs-44e27368281d4078a83c55003454d76683ddaad4.tar.gz
emacs-44e27368281d4078a83c55003454d76683ddaad4.zip
A better fix for bug #11464 with pos-visible-in-window-p and R2L text.
src/xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator state after an additional call to move_it_in_display_line_to, keep the values of it->max_ascent and it->max_descent found for the entire line. (pos_visible_p): Revert the comparison against bottom_y to what it was in 2012-05-13T18:22:35Z!eliz@gnu.org.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/xdisp.c14
2 files changed, 22 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2a7f8e2958f..b117a1e0406 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12012-05-19 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
4 state after an additional call to move_it_in_display_line_to, keep
5 the values of it->max_ascent and it->max_descent found for the
6 entire line.
7 (pos_visible_p): Revert the comparison against bottom_y to what it
8 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
9 (Bug#11464)
10
12012-05-15 Eli Zaretskii <eliz@gnu.org> 112012-05-15 Eli Zaretskii <eliz@gnu.org>
2 12
3 * xdisp.c (pos_visible_p): Fix last change. (Bug#11464) 13 * xdisp.c (pos_visible_p): Fix last change. (Bug#11464)
diff --git a/src/xdisp.c b/src/xdisp.c
index e8253c714e3..a3227b556a9 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1313,7 +1313,7 @@ pos_visible_p (struct window *w, EMACS_INT charpos, int *x, int *y,
1313 visible_p = bottom_y > window_top_y; 1313 visible_p = bottom_y > window_top_y;
1314 else if (top_y < it.last_visible_y) 1314 else if (top_y < it.last_visible_y)
1315 visible_p = 1; 1315 visible_p = 1;
1316 if (bottom_y <= it.last_visible_y 1316 if (bottom_y >= it.last_visible_y
1317 && it.bidi_p && it.bidi_it.scan_dir == -1 1317 && it.bidi_p && it.bidi_it.scan_dir == -1
1318 && IT_CHARPOS (it) < charpos) 1318 && IT_CHARPOS (it) < charpos)
1319 { 1319 {
@@ -8689,8 +8689,18 @@ move_it_to (struct it *it, EMACS_INT to_charpos, int to_x, int to_y, int to_vpos
8689 { 8689 {
8690 /* If TO_Y is in this line and TO_X was reached 8690 /* If TO_Y is in this line and TO_X was reached
8691 above, we scanned too far. We have to restore 8691 above, we scanned too far. We have to restore
8692 IT's settings to the ones before skipping. */ 8692 IT's settings to the ones before skipping. But
8693 keep the more accurate values of max_ascent and
8694 max_descent we've found while skipping the rest
8695 of the line, for the sake of callers, such as
8696 pos_visible_p, that need to know the line
8697 height. */
8698 int max_ascent = it->max_ascent;
8699 int max_descent = it->max_descent;
8700
8693 RESTORE_IT (it, &it_backup, backup_data); 8701 RESTORE_IT (it, &it_backup, backup_data);
8702 it->max_ascent = max_ascent;
8703 it->max_descent = max_descent;
8694 reached = 6; 8704 reached = 6;
8695 } 8705 }
8696 else 8706 else