ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/screen.C
(Generate patch)

Comparing rxvt-unicode/src/screen.C (file contents):
Revision 1.233 by root, Mon Jan 16 06:37:52 2006 UTC vs.
Revision 1.237 by root, Wed Jan 18 11:07:30 2006 UTC

448 scr_release (); 448 scr_release ();
449 prev_nrow = prev_ncol = 0; 449 prev_nrow = prev_ncol = 0;
450 scr_reset (); 450 scr_reset ();
451 451
452 scr_clear (true); 452 scr_clear (true);
453 scr_refresh (SLOW_REFRESH); 453 scr_refresh ();
454} 454}
455 455
456/* ------------------------------------------------------------------------- * 456/* ------------------------------------------------------------------------- *
457 * PROCESS SCREEN COMMANDS * 457 * PROCESS SCREEN COMMANDS *
458 * ------------------------------------------------------------------------- */ 458 * ------------------------------------------------------------------------- */
617 && row1 == 0 617 && row1 == 0
618 && (current_screen == PRIMARY || OPTION (Opt_secondaryScroll))) 618 && (current_screen == PRIMARY || OPTION (Opt_secondaryScroll)))
619 { 619 {
620 top_row = max (top_row - count, -saveLines); 620 top_row = max (top_row - count, -saveLines);
621 621
622 HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END));
623
624 // scroll everything up 'count' lines 622 // scroll everything up 'count' lines
625 term_start = (term_start + count) % total_rows; 623 term_start = (term_start + count) % total_rows;
626 624
625 // sever bottommost line
627 { 626 {
628 // severe bottommost scrolled line
629 line_t &l = ROW(row2 - count); 627 line_t &l = ROW(row2 - count);
628 l.is_longer (0);
630 l.touch (); 629 l.touch ();
631 l.is_longer (0);
632 } 630 }
633 631
634 // erase newly scorlled-in lines 632 // erase newly scrolled-in lines
635 for (int i = count; i; --i ) 633 for (int i = count; i--; )
636 { 634 {
637 // basically this is a slightly optimized scr_blank_screen_mem 635 // basically this is a slightly optimized scr_blank_screen_mem
638 // it is worth the effort on slower machines 636 // it is worth the effort on slower machines
639 line_t &l = ROW(nrow - i); 637 line_t &l = ROW(nrow - 1 - i);
640 638
641 scr_blank_line (l, 0, l.l, rstyle); 639 scr_blank_line (l, 0, l.l, rstyle);
642 640
643 l.l = 0; 641 l.l = 0;
644 l.f = 0; 642 l.f = 0;
675 // finally move the view window, if desired 673 // finally move the view window, if desired
676 if (OPTION (Opt_scrollWithBuffer) 674 if (OPTION (Opt_scrollWithBuffer)
677 && view_start != 0 675 && view_start != 0
678 && view_start != -saveLines) 676 && view_start != -saveLines)
679 scr_page (UP, count); 677 scr_page (UP, count);
678
679 if (SHOULD_INVOKE (HOOK_SCROLL_BACK))
680 HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END));
680 } 681 }
681 else 682 else
682 { 683 {
683 if (selection.op && current_screen == selection.screen) 684 if (selection.op && current_screen == selection.screen)
684 { 685 {
816 CLEAR_SELECTION (); 817 CLEAR_SELECTION ();
817 } 818 }
818 819
819 if (screen.flags & Screen_WrapNext) 820 if (screen.flags & Screen_WrapNext)
820 { 821 {
821 max_it (line->l, ncol);
822 line->is_longer (1);
823
824 scr_do_wrap (); 822 scr_do_wrap ();
825 823
824 line->l = ncol;
825 line->is_longer (1);
826
826 row = screen.cur.row; 827 row = screen.cur.row;
827 line = &ROW(row); /* _must_ refresh */ 828 line = &ROW(row); /* _must_ refresh */
828 } 829 }
829 830
830 // some utf-8 decoders "decode" surrogate characters: let's fix this. 831 // some utf-8 decoders "decode" surrogate characters: let's fix this.
1789 } 1790 }
1790 1791
1791 for (i = rc[PART_BEG].row; i <= rc[PART_END].row; i++) 1792 for (i = rc[PART_BEG].row; i <= rc[PART_END].row; i++)
1792 fill_text (&drawn_buf[i].t[rc[PART_BEG].col], 0, rc[PART_END].col - rc[PART_BEG].col + 1); 1793 fill_text (&drawn_buf[i].t[rc[PART_BEG].col], 0, rc[PART_END].col - rc[PART_BEG].col + 1);
1793 1794
1795 num_scr_allow = 0;
1796
1794 if (refresh) 1797 if (refresh)
1795 scr_refresh (SLOW_REFRESH); 1798 scr_refresh ();
1796} 1799}
1797 1800
1798/* ------------------------------------------------------------------------- */ 1801/* ------------------------------------------------------------------------- */
1799/* 1802/*
1800 * Refresh the entire screen 1803 * Refresh the entire screen
1839 if (new_view_start == view_start) 1842 if (new_view_start == view_start)
1840 return false; 1843 return false;
1841 1844
1842 num_scr += new_view_start - view_start; 1845 num_scr += new_view_start - view_start;
1843 view_start = new_view_start; 1846 view_start = new_view_start;
1847 want_refresh = 1;
1848
1844 HOOK_INVOKE ((this, HOOK_VIEW_CHANGE, DT_INT, view_start, DT_END)); 1849 HOOK_INVOKE ((this, HOOK_VIEW_CHANGE, DT_INT, view_start, DT_END));
1845 want_refresh = 1;
1846 1850
1847 return true; 1851 return true;
1848} 1852}
1849 1853
1850/* ------------------------------------------------------------------------- */ 1854/* ------------------------------------------------------------------------- */
1933 * Refresh the screen 1937 * Refresh the screen
1934 * drawn_text/drawn_rend contain the screen information before the update. 1938 * drawn_text/drawn_rend contain the screen information before the update.
1935 * screen.text/screen.rend contain what the screen will change to. 1939 * screen.text/screen.rend contain what the screen will change to.
1936 */ 1940 */
1937void 1941void
1938rxvt_term::scr_refresh (unsigned char refresh_type) 1942rxvt_term::scr_refresh ()
1939{ 1943{
1940 unsigned char must_clear, /* use draw_string not draw_image_string */ 1944 unsigned char must_clear, /* use draw_string not draw_image_string */
1941 showcursor; /* show the cursor */ 1945 showcursor; /* show the cursor */
1942 int16_t col, row, /* column/row we're processing */ 1946 int16_t col, row, /* column/row we're processing */
1943 ocrow; /* old cursor row */ 1947 ocrow; /* old cursor row */
2067#ifndef NO_SLOW_LINK_SUPPORT 2071#ifndef NO_SLOW_LINK_SUPPORT
2068 /* 2072 /*
2069 * D: CopyArea pass - very useful for slower links 2073 * D: CopyArea pass - very useful for slower links
2070 * This has been deliberately kept simple. 2074 * This has been deliberately kept simple.
2071 */ 2075 */
2072 i = num_scr;
2073 if (!display->is_local 2076 if (!display->is_local
2074 && refresh_type == FAST_REFRESH && num_scr_allow && num_scr 2077 && refresh_type == FAST_REFRESH && num_scr_allow && num_scr
2075 && abs (num_scr) < nrow && !must_clear) 2078 && abs (num_scr) < nrow && !must_clear)
2076 { 2079 {
2077 int16_t nits; 2080 int16_t nits;
2078 int j; 2081 int j;
2079 int len, wlen; 2082 int len, wlen;
2083 dLocal (int, num_scr);
2080 2084
2081 j = nrow; 2085 j = nrow;
2082 wlen = len = -1; 2086 wlen = len = -1;
2083 row = i > 0 ? 0 : j - 1; 2087 row = i > 0 ? 0 : j - 1;
2084 for (; j-- >= 0; row += (i > 0 ? 1 : -1)) 2088 for (; j-- >= 0; row += (i > 0 ? 1 : -1))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines