]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix xwidget scrolling
authorPo Lu <luangruo@yahoo.com>
Fri, 5 Nov 2021 07:27:36 +0000 (15:27 +0800)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 7 Nov 2021 01:59:40 +0000 (02:59 +0100)
* src/xterm.c (x_scroll_run): Use from_y and height.

src/xterm.c

index 756a8dd1edf28b04df8822c62eb0d95f0cdce936..9e0499ca0f2497283a99d4455f71fc765880e875 100644 (file)
@@ -4411,14 +4411,12 @@ x_scroll_run (struct window *w, struct run *run)
            {
              int window_y = view->y + view->clip_top;
              int window_height = view->clip_bottom - view->clip_top;
-             int min_y = min (from_y, to_y);
-             int max_y = max (from_y, to_y);
 
              Emacs_Rectangle r1, r2, result;
              r1.x = w->pixel_left;
-             r1.y = min_y;
+             r1.y = from_y;
              r1.width = w->pixel_width;
-             r1.height = max_y - min_y;
+             r1.height = height;
              r2 = r1;
              r2.y = window_y;
              r2.height = window_height;