… | |
… | |
631 | rxvt_term::scr_scroll_text (int row1, int row2, int count) NOTHROW |
631 | rxvt_term::scr_scroll_text (int row1, int row2, int count) NOTHROW |
632 | { |
632 | { |
633 | if (count == 0 || (row1 > row2)) |
633 | if (count == 0 || (row1 > row2)) |
634 | return 0; |
634 | return 0; |
635 | |
635 | |
|
|
636 | int rows = row2 - row1 + 1; |
|
|
637 | |
|
|
638 | min_it (count, rows); |
|
|
639 | |
636 | want_refresh = 1; |
640 | want_refresh = 1; |
637 | num_scr += count; |
641 | num_scr += count; |
638 | |
642 | |
639 | if (count > 0 |
643 | if (count > 0 |
640 | && row1 == 0 |
644 | && row1 == 0 |
… | |
… | |
731 | } |
735 | } |
732 | } |
736 | } |
733 | |
737 | |
734 | // use a simple and robust scrolling algorithm, this |
738 | // use a simple and robust scrolling algorithm, this |
735 | // part of scr_scroll_text is not time-critical. |
739 | // part of scr_scroll_text is not time-critical. |
736 | |
|
|
737 | int rows = row2 - row1 + 1; |
|
|
738 | |
|
|
739 | min_it (count, rows); |
|
|
740 | |
740 | |
741 | line_t *temp_buf = row_buf + total_rows; |
741 | line_t *temp_buf = row_buf + total_rows; |
742 | |
742 | |
743 | for (int row = 0; row < rows; row++) |
743 | for (int row = 0; row < rows; row++) |
744 | { |
744 | { |