diff src/dispnew.c @ 18015:934a44a3b34f

(scrolling): If a line is not enabled, give it an infinite draw_cost.
author Richard M. Stallman <rms@gnu.org>
date Thu, 29 May 1997 03:32:17 +0000
parents 86ae1679df19
children 95b4ac950a5d
line wrap: on
line diff
--- a/src/dispnew.c	Thu May 29 03:01:51 1997 +0000
+++ b/src/dispnew.c	Thu May 29 03:32:17 1997 +0000
@@ -1428,9 +1428,17 @@
 	return 0;
       old_hash[i] = line_hash_code (current_frame, i);
       if (! desired_frame->enable[i])
-	new_hash[i] = old_hash[i];
+	{
+	  /* This line cannot be redrawn, so don't let scrolling mess it.  */
+	  new_hash[i] = old_hash[i];
+#define INFINITY 1000000	/* Taken from scroll.c */
+	  draw_cost[i] = INFINITY;
+	}
       else
-	new_hash[i] = line_hash_code (desired_frame, i);
+	{
+	  new_hash[i] = line_hash_code (desired_frame, i);
+	  draw_cost[i] = line_draw_cost (desired_frame, i);
+	}
 
       if (old_hash[i] != new_hash[i])
 	{
@@ -1439,7 +1447,6 @@
 	}
       else if (i == unchanged_at_top)
 	unchanged_at_top++;
-      draw_cost[i] = line_draw_cost (desired_frame, i);
       old_draw_cost[i] = line_draw_cost (current_frame, i);
     }