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.438 by sf-exg, Mon Mar 25 15:41:07 2013 UTC vs.
Revision 1.440 by root, Wed Mar 27 17:24:16 2013 UTC

715 715
716 // finally move the view window, if desired 716 // finally move the view window, if desired
717 if (option (Opt_scrollWithBuffer) 717 if (option (Opt_scrollWithBuffer)
718 && view_start != 0 718 && view_start != 0
719 && view_start != -saveLines) 719 && view_start != -saveLines)
720 scr_page (UP, count); 720 scr_page (count);
721 721
722 if (SHOULD_INVOKE (HOOK_SCROLL_BACK)) 722 if (SHOULD_INVOKE (HOOK_SCROLL_BACK))
723 HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END)); 723 HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END));
724 } 724 }
725 else 725 else
1910/* 1910/*
1911 * Page the screen up/down nlines 1911 * Page the screen up/down nlines
1912 * direction should be UP or DN 1912 * direction should be UP or DN
1913 */ 1913 */
1914bool 1914bool
1915rxvt_term::scr_page (enum page_dirn direction, int nlines) NOTHROW 1915rxvt_term::scr_page (int nlines) NOTHROW
1916{ 1916{
1917 int new_view_start =
1918 direction == UP ? view_start - nlines
1919 : view_start + nlines;
1920
1921 return scr_changeview (new_view_start); 1917 return scr_changeview (view_start - nlines);
1922} 1918}
1923 1919
1924bool 1920bool
1925rxvt_term::scr_changeview (int new_view_start) NOTHROW 1921rxvt_term::scr_changeview (int new_view_start) NOTHROW
1926{ 1922{
2083 2079
2084 /* 2080 /*
2085 * C: set the cursor character (s) 2081 * C: set the cursor character (s)
2086 */ 2082 */
2087 { 2083 {
2088 bool setoldcursor;
2089
2090#ifdef CURSOR_BLINK 2084#ifdef CURSOR_BLINK
2091 if (hidden_cursor) 2085 if (hidden_cursor)
2092 showcursor = 0; 2086 showcursor = 0;
2093#endif 2087#endif
2094 2088
2145 scr_set_char_rend (ROW(screen.cur.row), cur_col, rend); 2139 scr_set_char_rend (ROW(screen.cur.row), cur_col, rend);
2146 } 2140 }
2147 } 2141 }
2148 2142
2149 /* make sure no outline cursor is left around */ 2143 /* make sure no outline cursor is left around */
2150 setoldcursor = 0;
2151 if (ocrow != -1) 2144 if (ocrow != -1)
2152 { 2145 {
2153 if (screen.cur.row - view_start != ocrow 2146 if (screen.cur.row - view_start != ocrow
2154 || screen.cur.col != oldcursor.col) 2147 || screen.cur.col != oldcursor.col)
2155 { 2148 {
2156 if (ocrow < nrow 2149 if (ocrow < nrow
2157 && oldcursor.col < ncol) 2150 && oldcursor.col < ncol)
2158 drawn_buf[ocrow].r[oldcursor.col] ^= (RS_RVid | RS_Uline); 2151 drawn_buf[ocrow].r[oldcursor.col] ^= (RS_RVid | RS_Uline);
2159
2160 if (focus || !showcursor)
2161 oldcursor.row = -1;
2162 else
2163 setoldcursor = 1;
2164 } 2152 }
2165 } 2153 }
2166 else if (!focus)
2167 setoldcursor = 1;
2168 2154
2169 if (setoldcursor) 2155 // save the current cursor coordinates if the cursor is visible
2156 // and the window is unfocused, so as to clear the outline cursor
2157 // in the next refresh if the cursor moves
2158 if (showcursor && !focus && screen.cur.row - view_start < nrow)
2170 { 2159 {
2171 if (screen.cur.row - view_start >= nrow)
2172 oldcursor.row = -1;
2173 else
2174 {
2175 oldcursor.row = screen.cur.row - view_start; 2160 oldcursor.row = screen.cur.row - view_start;
2176 oldcursor.col = screen.cur.col; 2161 oldcursor.col = screen.cur.col;
2177 }
2178 } 2162 }
2163 else
2164 oldcursor.row = -1;
2179 } 2165 }
2180 2166
2181#ifndef NO_SLOW_LINK_SUPPORT 2167#ifndef NO_SLOW_LINK_SUPPORT
2182 /* 2168 /*
2183 * D: CopyArea pass - very useful for slower links 2169 * D: CopyArea pass - very useful for slower links

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines