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.19 by pcg, Thu Jan 29 23:26:01 2004 UTC vs.
Revision 1.20 by pcg, Fri Jan 30 15:58:07 2004 UTC

1894 /* 1894 /*
1895 * A: set up vars 1895 * A: set up vars
1896 */ 1896 */
1897 clearfirst = clearlast = must_clear = 0; 1897 clearfirst = clearlast = must_clear = 0;
1898 1898
1899 if (currmaxcol < TermWin.ncol)
1900 {
1901 currmaxcol = TermWin.ncol;
1902 buffer = (char *)rxvt_realloc (buffer,
1903 sizeof(char) * (currmaxcol + 1) * MB_CUR_MAX);
1904 }
1905
1906 refresh_count = 0; 1899 refresh_count = 0;
1907 1900
1908 row_offset = TermWin.saveLines - TermWin.view_start; 1901 row_offset = TermWin.saveLines - TermWin.view_start;
1909 1902
1910 if ((refresh_type & REFRESH_BOUNDS)) 1903 if ((refresh_type & REFRESH_BOUNDS))
1953 if (showcursor && TermWin.focus) 1946 if (showcursor && TermWin.focus)
1954 { 1947 {
1955 *srp ^= RS_RVid; 1948 *srp ^= RS_RVid;
1956#ifndef NO_CURSORCOLOR 1949#ifndef NO_CURSORCOLOR
1957 cc1 = *srp & (RS_fgMask | RS_bgMask); 1950 cc1 = *srp & (RS_fgMask | RS_bgMask);
1958 if (Xdepth > 2 && ISSET_PIXCOLOR (this, Color_cursor)) 1951 if (ISSET_PIXCOLOR (this, Color_cursor))
1959 ccol1 = Color_cursor; 1952 ccol1 = Color_cursor;
1960 else 1953 else
1961#ifdef CURSOR_COLOR_IS_RENDITION_COLOR 1954#ifdef CURSOR_COLOR_IS_RENDITION_COLOR
1962 ccol1 = GET_FGCOLOR(rstyle); 1955 ccol1 = GET_FGCOLOR(rstyle);
1963#else 1956#else
1964 ccol1 = Color_fg; 1957 ccol1 = Color_fg;
1965#endif 1958#endif
1966 if (Xdepth > 2 && ISSET_PIXCOLOR (this, Color_cursor2)) 1959 if (ISSET_PIXCOLOR (this, Color_cursor2))
1967 ccol2 = Color_cursor2; 1960 ccol2 = Color_cursor2;
1968 else 1961 else
1969#ifdef CURSOR_COLOR_IS_RENDITION_COLOR 1962#ifdef CURSOR_COLOR_IS_RENDITION_COLOR
1970 ccol2 = GET_BGCOLOR(rstyle); 1963 ccol2 = GET_BGCOLOR(rstyle);
1971#else 1964#else
2168 hidden_text = 0; 2161 hidden_text = 0;
2169 } 2162 }
2170 else if (hidden_text) 2163 else if (hidden_text)
2171 fore = back; 2164 fore = back;
2172 } 2165 }
2173#elif OPTION_HC
2174 if (!rvid && (rend & RS_Blink))
2175 {
2176 if (Xdepth > 2 && ISSET_PIXCOLOR (this, Color_HC))
2177 back = Color_HC;
2178 else
2179 rvid = !rvid; /* fall back */
2180 }
2181#endif 2166#endif
2182 if (rvid) 2167 if (rvid)
2183 { 2168 {
2184 SWAP_IT(fore, back, int); 2169 SWAP_IT(fore, back, int);
2185 2170
2186#ifndef NO_BOLD_UNDERLINE_REVERSE 2171#ifndef NO_BOLD_UNDERLINE_REVERSE
2187 if (Xdepth > 2 && ISSET_PIXCOLOR (this, Color_RV) 2172 if (ISSET_PIXCOLOR (this, Color_RV)
2188# ifndef NO_CURSORCOLOR 2173# ifndef NO_CURSORCOLOR
2189 && !ISSET_PIXCOLOR (this, Color_cursor) 2174 && !ISSET_PIXCOLOR (this, Color_cursor)
2190# endif 2175# endif
2191 ) 2176 )
2192 back = Color_RV; 2177 back = Color_RV;
2193#endif 2178#endif
2194 } 2179 }
2195#ifndef NO_BOLD_UNDERLINE_REVERSE 2180#ifndef NO_BOLD_UNDERLINE_REVERSE
2196 else if (rend & RS_Bold) 2181 else if (rend & RS_Bold)
2197 { 2182 {
2198 if (Xdepth > 2)
2199 if (ISSET_PIXCOLOR (this, Color_BD)) 2183 if (ISSET_PIXCOLOR (this, Color_BD))
2200 fore = Color_BD; 2184 fore = Color_BD;
2201 else 2185 else if (fore == Color_fg)
2202 fore = Color_White; 2186 fore = Color_White;
2203 } 2187 }
2204 else if (rend & RS_Uline) 2188 else if (rend & RS_Uline)
2205 { 2189 {
2206 if (Xdepth > 2 && ISSET_PIXCOLOR (this, Color_UL)) 2190 if (ISSET_PIXCOLOR (this, Color_UL))
2207 fore = Color_UL; 2191 fore = Color_UL;
2208 } 2192 }
2209#endif 2193#endif
2210 2194
2211 /* 2195 /*
2253#endif 2237#endif
2254 } else if (oldcursor.row >= 0) { 2238 } else if (oldcursor.row >= 0) {
2255#ifndef NO_CURSORCOLOR 2239#ifndef NO_CURSORCOLOR
2256 unsigned long gcmask; /* Graphics Context mask */ 2240 unsigned long gcmask; /* Graphics Context mask */
2257 2241
2258 if (Xdepth > 2 && ISSET_PIXCOLOR (this, Color_cursor)) 2242 if (ISSET_PIXCOLOR (this, Color_cursor))
2259 XSetForeground (Xdisplay, TermWin.gc, PixColors[Color_cursor]); 2243 XSetForeground (Xdisplay, TermWin.gc, PixColors[Color_cursor]);
2260#endif 2244#endif
2261 XDrawRectangle(Xdisplay, drawBuffer, TermWin.gc, 2245 XDrawRectangle(Xdisplay, drawBuffer, TermWin.gc,
2262 Col2Pixel(oldcursor.col), 2246 Col2Pixel(oldcursor.col),
2263 Row2Pixel(oldcursor.row), 2247 Row2Pixel(oldcursor.row),
2346 i = end_row; 2330 i = end_row;
2347 } 2331 }
2348 end_row += R->TermWin.nrow; 2332 end_row += R->TermWin.nrow;
2349 for (; i < row && i < end_row; i++, col = 0) 2333 for (; i < row && i < end_row; i++, col = 0)
2350 for (srp = R->screen.rend[i]; col < R->TermWin.ncol; col++) 2334 for (srp = R->screen.rend[i]; col < R->TermWin.ncol; col++)
2351#ifndef OPTION_HC
2352 srp[col] ^= RS_RVid; 2335 srp[col] ^= RS_RVid;
2353#else
2354 srp[col] ^= RS_Blink;
2355#endif
2356 if (i == row && i < end_row) 2336 if (i == row && i < end_row)
2357 for (srp = R->screen.rend[i]; col < R->selection.end.col; col++) 2337 for (srp = R->screen.rend[i]; col < R->selection.end.col; col++)
2358#ifndef OPTION_HC
2359 srp[col] ^= RS_RVid; 2338 srp[col] ^= RS_RVid;
2360#else
2361 srp[col] ^= RS_Blink;
2362#endif
2363 } 2339 }
2364} 2340}
2365 2341
2366/* ------------------------------------------------------------------------- */ 2342/* ------------------------------------------------------------------------- */
2367/* 2343/*

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines