From: Eli Zaretskii Date: Fri, 5 Feb 2021 12:24:01 +0000 (+0200) Subject: Fix last change in 'window-text-pixel-size' X-Git-Tag: emacs-28.0.90~3920 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=764db69dd06b794074561e3830fdf02e67698445;p=emacs.git Fix last change in 'window-text-pixel-size' * src/xdisp.c (Fwindow_text_pixel_size): Fix last change: preserve the original Y coordinate after start_display, instead of zeroing it out. Reported by martin rudalics . --- diff --git a/src/xdisp.c b/src/xdisp.c index 426c874cdb5..4db981aa655 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10706,6 +10706,7 @@ include the height of both, if present, in the return value. */) itdata = bidi_shelve_cache (); start_display (&it, w, startp); + int start_y = it.current_y; /* It makes no sense to measure dimensions of region of text that crosses the point where bidi reordering changes scan direction. By using unidirectional movement here we at least support the use @@ -10726,7 +10727,7 @@ include the height of both, if present, in the return value. */) int start_x = it.current_x; int move_op = MOVE_TO_POS | MOVE_TO_Y; int to_x = -1; - it.current_y = 0; + it.current_y = start_y; /* If FROM is on a newline, pretend that we start at the beginning of the next line, because the newline takes no place on display. */ if (FETCH_BYTE (start) == '\n')