aboutsummaryrefslogtreecommitdiffstats
path: root/src/dispnew.c
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1997-05-29 03:32:17 +0000
committerRichard M. Stallman <[email protected]>1997-05-29 03:32:17 +0000
commitf188b3c4b8facf2ba99783381e3ebf3a58c2f28b (patch)
tree4af1a414fd44a1bc216f4fb46e62dd747ec74639 /src/dispnew.c
parent56329bc5edfec8bf502fcca5ff06f08d9ade5762 (diff)
(scrolling): If a line is not enabled,
give it an infinite draw_cost.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r--src/dispnew.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 4c0cd1b917..ad7ed32c40 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);
}