From f188b3c4b8facf2ba99783381e3ebf3a58c2f28b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 29 May 1997 03:32:17 +0000 Subject: [PATCH] (scrolling): If a line is not enabled, give it an infinite draw_cost. --- src/dispnew.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/dispnew.c b/src/dispnew.c index 4c0cd1b917e..ad7ed32c40a 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -1428,9 +1428,17 @@ scrolling (frame) 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 @@ scrolling (frame) } 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); } -- 2.39.2