aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-12-26 15:35:48 +0000
committerRichard M. Stallman1994-12-26 15:35:48 +0000
commit190bb91a07e39d64623afcd58bd5eb4191a387c5 (patch)
treea9596975c7fabeaa9611f152e62e927fa8000dc3 /src
parent33c448cd1a819ef9a2d83f4c87201615655c2bfe (diff)
downloademacs-190bb91a07e39d64623afcd58bd5eb4191a387c5.tar.gz
emacs-190bb91a07e39d64623afcd58bd5eb4191a387c5.zip
(scrolling): Fewer restrictions if scroll_region_ok is
set. New vector old_draw_cost for direct scrolling method.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c7
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)
1387 int *old_hash = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int)); 1387 int *old_hash = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int));
1388 int *new_hash = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int)); 1388 int *new_hash = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int));
1389 int *draw_cost = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int)); 1389 int *draw_cost = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int));
1390 int *old_draw_cost = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int));
1390 register int i; 1391 register int i;
1391 int free_at_end_vpos = FRAME_HEIGHT (frame); 1392 int free_at_end_vpos = FRAME_HEIGHT (frame);
1392 register struct frame_glyphs *current_frame = FRAME_CURRENT_GLYPHS (frame); 1393 register struct frame_glyphs *current_frame = FRAME_CURRENT_GLYPHS (frame);
@@ -1419,10 +1420,11 @@ scrolling (frame)
1419 else if (i == unchanged_at_top) 1420 else if (i == unchanged_at_top)
1420 unchanged_at_top++; 1421 unchanged_at_top++;
1421 draw_cost[i] = line_draw_cost (desired_frame, i); 1422 draw_cost[i] = line_draw_cost (desired_frame, i);
1423 old_draw_cost[i] = line_draw_cost (current_frame, i);
1422 } 1424 }
1423 1425
1424 /* If changed lines are few, don't allow preemption, don't scroll. */ 1426 /* If changed lines are few, don't allow preemption, don't scroll. */
1425 if (changed_lines < baud_rate / 2400 1427 if (!scroll_region_ok && changed_lines < baud_rate / 2400
1426 || unchanged_at_bottom == FRAME_HEIGHT (frame)) 1428 || unchanged_at_bottom == FRAME_HEIGHT (frame))
1427 return 1; 1429 return 1;
1428 1430
@@ -1436,7 +1438,7 @@ scrolling (frame)
1436 1438
1437 /* If large window, fast terminal and few lines in common between 1439 /* If large window, fast terminal and few lines in common between
1438 current frame and desired frame, don't bother with i/d calc. */ 1440 current frame and desired frame, don't bother with i/d calc. */
1439 if (window_size >= 18 && baud_rate > 2400 1441 if (!scroll_region_ok && window_size >= 18 && baud_rate > 2400
1440 && (window_size >= 1442 && (window_size >=
1441 10 * scrolling_max_lines_saved (unchanged_at_top, 1443 10 * scrolling_max_lines_saved (unchanged_at_top,
1442 FRAME_HEIGHT (frame) - unchanged_at_bottom, 1444 FRAME_HEIGHT (frame) - unchanged_at_bottom,
@@ -1445,6 +1447,7 @@ scrolling (frame)
1445 1447
1446 scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom, 1448 scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom,
1447 draw_cost + unchanged_at_top - 1, 1449 draw_cost + unchanged_at_top - 1,
1450 old_draw_cost + unchanged_at_top - 1,
1448 old_hash + unchanged_at_top - 1, 1451 old_hash + unchanged_at_top - 1,
1449 new_hash + unchanged_at_top - 1, 1452 new_hash + unchanged_at_top - 1,
1450 free_at_end_vpos - unchanged_at_top); 1453 free_at_end_vpos - unchanged_at_top);