]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid crashes when scrolling images under winner-mode
authorEli Zaretskii <eliz@gnu.org>
Mon, 21 Oct 2024 17:42:01 +0000 (20:42 +0300)
committerEshel Yaron <me@eshelyaron.com>
Fri, 25 Oct 2024 05:05:27 +0000 (07:05 +0200)
* src/window.c (window_scroll_pixel_based): Fix calculation of a
window's vscroll.  (Bug#73933)

(cherry picked from commit 48024096fea5ccdeb79dab5793a6f7a293b95919)

src/window.c

index 34968ac824fee4db0a59910f54e07588880d31d5..7f1579116857a3e2e626c8ed097896283f22e02c 100644 (file)
@@ -6140,7 +6140,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
              /* The last line was only partially visible, make it fully
                 visible.  */
              w->vscroll = (it.last_visible_y
-                           - it.current_y + it.max_ascent + it.max_descent);
+                           - (it.current_y + it.max_ascent + it.max_descent));
              adjust_frame_glyphs (it.f);
            }
          else