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.34 by pcg, Tue Feb 24 00:44:23 2004 UTC vs.
Revision 1.35 by pcg, Tue Feb 24 11:48:40 2004 UTC

1835 ((Y) >= (X)->min_char_or_byte2 && (Y) <= (X)->max_char_or_byte2) 1835 ((Y) >= (X)->min_char_or_byte2 && (Y) <= (X)->max_char_or_byte2)
1836 1836
1837void 1837void
1838rxvt_term::scr_refresh (unsigned char refresh_type) 1838rxvt_term::scr_refresh (unsigned char refresh_type)
1839{ 1839{
1840 unsigned char clearfirst, /* first character writes before cell */ 1840 unsigned char clearfirst, /* first character writes before cell */
1841 clearlast, /* last character writes beyond cell */ 1841 clearlast, /* last character writes beyond cell */
1842 must_clear, /* use draw_string not draw_image_string */ 1842 must_clear, /* use draw_string not draw_image_string */
1843 rvid, /* reverse video this position */ 1843 rvid, /* reverse video this position */
1844 showcursor; /* show the cursor */ 1844 showcursor; /* show the cursor */
1845 int16_t col, row, /* column/row we're processing */ 1845 int16_t col, row, /* column/row we're processing */
1846 ocrow; /* old cursor row */ 1846 ocrow; /* old cursor row */
1847 int cursorwidth;
1848 int i, /* tmp */ 1847 int i, /* tmp */
1849 row_offset; /* basic offset in screen structure */ 1848 row_offset; /* basic offset in screen structure */
1850#ifndef NO_CURSORCOLOR 1849#ifndef NO_CURSORCOLOR
1851 rend_t cc1; /* store colours at cursor position (s) */ 1850 rend_t cc1; /* store colours at cursor position (s) */
1852#endif 1851#endif
1853 rend_t *drp, *srp; /* drawn-rend-pointer, screen-rend-pointer */ 1852 rend_t *drp, *srp; /* drawn-rend-pointer, screen-rend-pointer */
1854 text_t *dtp, *stp; /* drawn-text-pointer, screen-text-pointer */ 1853 text_t *dtp, *stp; /* drawn-text-pointer, screen-text-pointer */
1855 1854
1856 if (refresh_type == NO_REFRESH || !TermWin.mapped) 1855 if (refresh_type == NO_REFRESH || !TermWin.mapped)
1857 return; 1856 return;
1858 1857
1859 /* 1858 /*
1891 unsigned char setoldcursor; 1890 unsigned char setoldcursor;
1892 rend_t ccol1, /* Cursor colour */ 1891 rend_t ccol1, /* Cursor colour */
1893 ccol2; /* Cursor colour2 */ 1892 ccol2; /* Cursor colour2 */
1894 1893
1895 showcursor = (screen.flags & Screen_VisibleCursor); 1894 showcursor = (screen.flags & Screen_VisibleCursor);
1896 cursorwidth = 0;
1897#ifdef CURSOR_BLINK 1895#ifdef CURSOR_BLINK
1898 if (hidden_cursor) 1896 if (hidden_cursor)
1899 showcursor = 0; 1897 showcursor = 0;
1900#endif 1898#endif
1901 1899
1902 cursorwidth = 0;
1903
1904 if (showcursor) 1900 if (showcursor)
1905 { 1901 {
1906 cursorwidth++;
1907
1908 srp = & (screen.rend[screen.cur.row + TermWin.saveLines] 1902 srp = & (screen.rend[screen.cur.row + TermWin.saveLines]
1909 [screen.cur.col]); 1903 [screen.cur.col]);
1910 1904
1911 if (showcursor && TermWin.focus) 1905 if (showcursor && TermWin.focus)
1912 { 1906 {
1930 ccol2 = Color_bg; 1924 ccol2 = Color_bg;
1931#endif 1925#endif
1932 *srp = SET_FGCOLOR (*srp, ccol1); 1926 *srp = SET_FGCOLOR (*srp, ccol1);
1933 *srp = SET_BGCOLOR (*srp, ccol2); 1927 *srp = SET_BGCOLOR (*srp, ccol2);
1934#endif 1928#endif
1935
1936 } 1929 }
1937 } 1930 }
1938 1931
1939 /* make sure no outline cursor is left around */ 1932 /* make sure no outline cursor is left around */
1940 setoldcursor = 0; 1933 setoldcursor = 0;
2211 [screen.cur.col]); 2204 [screen.cur.col]);
2212 *srp ^= RS_RVid; 2205 *srp ^= RS_RVid;
2213#ifndef NO_CURSORCOLOR 2206#ifndef NO_CURSORCOLOR
2214 *srp = (*srp & ~ (RS_fgMask | RS_bgMask)) | cc1; 2207 *srp = (*srp & ~ (RS_fgMask | RS_bgMask)) | cc1;
2215#endif 2208#endif
2216
2217 } 2209 }
2218 else if (oldcursor.row >= 0) 2210 else if (oldcursor.row >= 0)
2219 { 2211 {
2220#ifndef NO_CURSORCOLOR 2212#ifndef NO_CURSORCOLOR
2221 if (ISSET_PIXCOLOR (Color_cursor)) 2213 if (ISSET_PIXCOLOR (Color_cursor))
2222 XSetForeground (display->display, TermWin.gc, PixColors[Color_cursor]); 2214 XSetForeground (display->display, TermWin.gc, PixColors[Color_cursor]);
2223#endif 2215#endif
2216 int cursorwidth = 1;
2217 while (oldcursor.col + cursorwidth < TermWin.ncol
2218 && drawn_text[oldcursor.row][oldcursor.col + cursorwidth] == NOCHAR)
2219 cursorwidth++;
2220
2224 XDrawRectangle (display->display, drawBuffer, TermWin.gc, 2221 XDrawRectangle (display->display, drawBuffer, TermWin.gc,
2225 Col2Pixel (oldcursor.col), 2222 Col2Pixel (oldcursor.col),
2226 Row2Pixel (oldcursor.row), 2223 Row2Pixel (oldcursor.row),
2227 (unsigned int) (Width2Pixel (cursorwidth) - 1), 2224 (unsigned int) (Width2Pixel (cursorwidth) - 1),
2228 (unsigned int) (Height2Pixel (1) - TermWin.lineSpace - 1)); 2225 (unsigned int) (Height2Pixel (1) - TermWin.lineSpace - 1));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines