changeset 5739:0709eb474647

(try_window_id): Don't pass value beyond ZV to compute_motion.
author Karl Heuer <kwzh@gnu.org>
date Wed, 02 Feb 1994 07:25:37 +0000
parents 730f63010940
children 48da4ed089e9
files src/xdisp.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Wed Feb 02 07:16:51 1994 +0000
+++ b/src/xdisp.c	Wed Feb 02 07:25:37 1994 +0000
@@ -1425,13 +1425,13 @@
   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)