emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 764db69: Fix last change in 'window-text-pixel-size'


From: Eli Zaretskii
Subject: master 764db69: Fix last change in 'window-text-pixel-size'
Date: Fri, 5 Feb 2021 07:24:40 -0500 (EST)

branch: master
commit 764db69dd06b794074561e3830fdf02e67698445
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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 <rudalics@gmx.at>.
---
 src/xdisp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 426c874..4db981aa 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')



reply via email to

[Prev in Thread] Current Thread [Next in Thread]