diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-12-26 15:35:48 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-12-26 15:35:48 +0000 |
commit | 33d32d4d9aadaf9077f5c9f6feec5aa0fc08eba6 (patch) | |
tree | 6360b4f1e2b07ba5defd8ef04d338dbff75cc8f9 /src/dispnew.c | |
parent | e9e906a3fc4826d51e5467e81b2ad41940b65015 (diff) | |
download | emacs-33d32d4d9aadaf9077f5c9f6feec5aa0fc08eba6.tar.gz |
(scrolling): Fewer restrictions if scroll_region_ok is
set. New vector old_draw_cost for direct scrolling method.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r-- | src/dispnew.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 44c5536aa39..48c636f22f0 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -1387,6 +1387,7 @@ scrolling (frame) int *old_hash = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int)); int *new_hash = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int)); int *draw_cost = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int)); + int *old_draw_cost = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int)); register int i; int free_at_end_vpos = FRAME_HEIGHT (frame); register struct frame_glyphs *current_frame = FRAME_CURRENT_GLYPHS (frame); @@ -1419,10 +1420,11 @@ 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); } /* If changed lines are few, don't allow preemption, don't scroll. */ - if (changed_lines < baud_rate / 2400 + if (!scroll_region_ok && changed_lines < baud_rate / 2400 || unchanged_at_bottom == FRAME_HEIGHT (frame)) return 1; @@ -1436,7 +1438,7 @@ scrolling (frame) /* If large window, fast terminal and few lines in common between current frame and desired frame, don't bother with i/d calc. */ - if (window_size >= 18 && baud_rate > 2400 + if (!scroll_region_ok && window_size >= 18 && baud_rate > 2400 && (window_size >= 10 * scrolling_max_lines_saved (unchanged_at_top, FRAME_HEIGHT (frame) - unchanged_at_bottom, @@ -1445,6 +1447,7 @@ scrolling (frame) scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom, draw_cost + unchanged_at_top - 1, + old_draw_cost + unchanged_at_top - 1, old_hash + unchanged_at_top - 1, new_hash + unchanged_at_top - 1, free_at_end_vpos - unchanged_at_top); |