# HG changeset patch # User Richard M. Stallman # Date 864876737 0 # Node ID 934a44a3b34fa17fd1a97bfcf38afc994f5150db # Parent 9492b5c8485a3d1ff4a1bdb58e78d4eda08c5ace (scrolling): If a line is not enabled, give it an infinite draw_cost. diff -r 9492b5c8485a -r 934a44a3b34f src/dispnew.c --- 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); }