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.228 by root, Sun Jan 15 06:02:41 2006 UTC vs.
Revision 1.234 by root, Mon Jan 16 08:57:02 2006 UTC

115 * SCREEN `COMMON' ROUTINES * 115 * SCREEN `COMMON' ROUTINES *
116 * ------------------------------------------------------------------------- */ 116 * ------------------------------------------------------------------------- */
117 117
118/* Fill part/all of a line with blanks. */ 118/* Fill part/all of a line with blanks. */
119void 119void
120rxvt_term::scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) 120rxvt_term::scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const
121{ 121{
122 if (!l.t) 122 if (!l.t)
123 { 123 {
124 lalloc (l); 124 lalloc (l);
125 col = 0; 125 col = 0;
142} 142}
143 143
144/* ------------------------------------------------------------------------- */ 144/* ------------------------------------------------------------------------- */
145/* Fill a full line with blanks - make sure it is allocated first */ 145/* Fill a full line with blanks - make sure it is allocated first */
146void 146void
147rxvt_term::scr_blank_screen_mem (line_t &l, rend_t efs) 147rxvt_term::scr_blank_screen_mem (line_t &l, rend_t efs) const
148{ 148{
149 scr_blank_line (l, 0, ncol, efs); 149 scr_blank_line (l, 0, ncol, efs);
150 150
151 l.l = 0; 151 l.l = 0;
152 l.f = 0; 152 l.f = 0;
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
627 { 625 {
628 // severe bottommost scrolled line 626 // severe bottommost scrolled line
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 {
1811 * the top of the screen 1812 * the top of the screen
1812 */ 1813 */
1813void 1814void
1814rxvt_term::scr_move_to (int y, int len) 1815rxvt_term::scr_move_to (int y, int len)
1815{ 1816{
1816 int p = (top_row - nrow) * (len - y) / len + (nrow - 1); 1817 scr_changeview ((top_row - nrow) * (len - y) / len + (nrow - 1));
1817
1818 scr_changeview (p);
1819} 1818}
1820 1819
1821/* ------------------------------------------------------------------------- */ 1820/* ------------------------------------------------------------------------- */
1822/* 1821/*
1823 * Page the screen up/down nlines 1822 * Page the screen up/down nlines
1836bool 1835bool
1837rxvt_term::scr_changeview (int new_view_start) 1836rxvt_term::scr_changeview (int new_view_start)
1838{ 1837{
1839 clamp_it (new_view_start, top_row, 0); 1838 clamp_it (new_view_start, top_row, 0);
1840 1839
1841 if (new_view_start != view_start) 1840 if (new_view_start == view_start)
1842 {
1843 num_scr += new_view_start - view_start;
1844 view_start = new_view_start;
1845 HOOK_INVOKE ((this, HOOK_VIEW_CHANGE, DT_INT, view_start, DT_END));
1846 want_refresh = 1;
1847
1848 return true;
1849 }
1850 else
1851 return false; 1841 return false;
1842
1843 num_scr += new_view_start - view_start;
1844 view_start = new_view_start;
1845 want_refresh = 1;
1846
1847 HOOK_INVOKE ((this, HOOK_VIEW_CHANGE, DT_INT, view_start, DT_END));
1848
1849 return true;
1852} 1850}
1853 1851
1854/* ------------------------------------------------------------------------- */ 1852/* ------------------------------------------------------------------------- */
1855void 1853void
1856rxvt_term::scr_bell () 1854rxvt_term::scr_bell ()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines