]> git.eshelyaron.com Git - emacs.git/commitdiff
(try_window_id): Don't pass value beyond ZV to compute_motion.
authorKarl Heuer <kwzh@gnu.org>
Wed, 2 Feb 1994 07:25:37 +0000 (07:25 +0000)
committerKarl Heuer <kwzh@gnu.org>
Wed, 2 Feb 1994 07:25:37 +0000 (07:25 +0000)
src/xdisp.c

index 2dbbbabb0d09c045f95bef94c62ae9d87c8333dd..2fd2e6ee629059f77fa272bc41d7e85b8b421150 100644 (file)
@@ -1425,13 +1425,13 @@ try_window_id (window)
   if (Z - GPT < end_unchanged)
     end_unchanged = Z - GPT;
 
-  if (beg_unchanged + 1 < start)
+  if (beg_unchanged + BEG < start)
     return 0;                  /* Give up if changes go above top of window */
 
   /* Find position before which nothing is changed.  */
   bp = *compute_motion (start, 0, lmargin,
-                       beg_unchanged + 1, height + 1, 0, width, hscroll,
-                       pos_tab_offset (w, start));
+                       min (ZV, beg_unchanged + BEG), height + 1, 0,
+                       width, hscroll, pos_tab_offset (w, start));
   if (bp.vpos >= height)
     {
       if (point < bp.bufpos && !bp.contin)