… | |
… | |
1712 | * the top of the screen |
1712 | * the top of the screen |
1713 | */ |
1713 | */ |
1714 | int |
1714 | int |
1715 | rxvt_term::scr_move_to (int y, int len) |
1715 | rxvt_term::scr_move_to (int y, int len) |
1716 | { |
1716 | { |
1717 | long p = 0; |
1717 | long p = 0; |
1718 | uint16_t oldviewstart; |
1718 | uint16_t oldviewstart; |
1719 | |
1719 | |
1720 | oldviewstart = TermWin.view_start; |
1720 | oldviewstart = TermWin.view_start; |
1721 | if (y < len) { |
1721 | if (y < len) { |
1722 | p = (TermWin.nrow + TermWin.nscrolled) * (len - y) / len; |
1722 | p = (TermWin.nrow + TermWin.nscrolled) * (len - y) / len; |
1723 | p -= (long)(TermWin.nrow - 1); |
1723 | p -= (long)(TermWin.nrow - 1); |
… | |
… | |
1871 | { |
1871 | { |
1872 | clearfirst = clearlast = 1; |
1872 | clearfirst = clearlast = 1; |
1873 | refresh_type &= ~REFRESH_BOUNDS; |
1873 | refresh_type &= ~REFRESH_BOUNDS; |
1874 | } |
1874 | } |
1875 | |
1875 | |
1876 | #if defined(XPM_BACKGROUND) |
1876 | #ifdef XPM_BACKGROUND |
1877 | must_clear |= (bgPixmap.pixmap != None); |
1877 | must_clear |= (bgPixmap.pixmap != None); |
1878 | #endif |
1878 | #endif |
1879 | #if defined(TRANSPARENT) |
1879 | #ifdef TRANSPARENT |
1880 | must_clear |= ((Options & Opt_transparent) && am_transparent); |
1880 | must_clear |= ((Options & Opt_transparent) && am_transparent); |
1881 | #endif |
1881 | #endif |
1882 | ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ |
1882 | ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ |
1883 | |
1883 | |
1884 | /* |
1884 | /* |
… | |
… | |
2117 | int back = GET_BGCOLOR (rend); // desired background |
2117 | int back = GET_BGCOLOR (rend); // desired background |
2118 | |
2118 | |
2119 | rend = GET_ATTR (rend); |
2119 | rend = GET_ATTR (rend); |
2120 | |
2120 | |
2121 | rvid = !!(rend & RS_RVid); |
2121 | rvid = !!(rend & RS_RVid); |
|
|
2122 | if (rvid) |
|
|
2123 | { |
|
|
2124 | SWAP_IT(fore, back, int); |
|
|
2125 | |
|
|
2126 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
|
|
2127 | if (ISSET_PIXCOLOR (Color_RV) |
|
|
2128 | # ifndef NO_CURSORCOLOR |
|
|
2129 | && !ISSET_PIXCOLOR (Color_cursor) |
|
|
2130 | # endif |
|
|
2131 | ) |
|
|
2132 | back = Color_RV; |
|
|
2133 | #endif |
|
|
2134 | } |
2122 | #ifdef TEXT_BLINK |
2135 | #ifdef TEXT_BLINK |
2123 | if (rend & RS_Blink) |
2136 | if (rend & RS_Blink) |
2124 | { |
2137 | { |
2125 | if (!text_blink_ev.active) |
2138 | if (!text_blink_ev.active) |
2126 | { |
2139 | { |
… | |
… | |
2129 | } |
2142 | } |
2130 | else if (hidden_text) |
2143 | else if (hidden_text) |
2131 | fore = back; |
2144 | fore = back; |
2132 | } |
2145 | } |
2133 | #endif |
2146 | #endif |
2134 | if (rvid) |
|
|
2135 | { |
|
|
2136 | SWAP_IT(fore, back, int); |
|
|
2137 | |
|
|
2138 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
|
|
2139 | if (ISSET_PIXCOLOR (Color_RV) |
|
|
2140 | # ifndef NO_CURSORCOLOR |
|
|
2141 | && !ISSET_PIXCOLOR (Color_cursor) |
|
|
2142 | # endif |
|
|
2143 | ) |
|
|
2144 | back = Color_RV; |
|
|
2145 | #endif |
|
|
2146 | } |
|
|
2147 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
2147 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
2148 | else if (rend & RS_Bold) |
2148 | else if (rend & RS_Bold) |
2149 | { |
2149 | { |
2150 | if (ISSET_PIXCOLOR (Color_BD)) |
2150 | if (ISSET_PIXCOLOR (Color_BD)) |
2151 | fore = Color_BD; |
2151 | fore = Color_BD; |
… | |
… | |
2162 | /* |
2162 | /* |
2163 | * Actually do the drawing of the string here |
2163 | * Actually do the drawing of the string here |
2164 | */ |
2164 | */ |
2165 | rxvt_font *font = (*TermWin.fontset)[fid]; |
2165 | rxvt_font *font = (*TermWin.fontset)[fid]; |
2166 | |
2166 | |
|
|
2167 | if (back == fore) |
|
|
2168 | font->clear_rect (xpixel, ypixel, |
|
|
2169 | TermWin.fwidth * count, TermWin.fheight, |
|
|
2170 | back); |
2167 | if (back == Color_bg) |
2171 | else if (back == Color_bg) |
2168 | { |
2172 | { |
2169 | if (must_clear) |
2173 | if (must_clear) |
2170 | { |
2174 | { |
|
|
2175 | CLEAR_CHARS (xpixel, ypixel, count); |
|
|
2176 | |
2171 | for (i = 0; i < count; i++) /* don't draw empty strings */ |
2177 | for (i = 0; i < count; i++) /* don't draw empty strings */ |
2172 | if (text[i] != ' ') |
2178 | if (text[i] != ' ') |
2173 | { |
2179 | { |
2174 | font->draw (xpixel, ypixel, text, count, fore, -1); |
2180 | font->draw (xpixel, ypixel, text, count, fore, -1); |
2175 | goto nodraw; |
2181 | break; |
2176 | } |
2182 | } |
2177 | |
|
|
2178 | CLEAR_CHARS (xpixel, ypixel, count); |
|
|
2179 | nodraw: ; |
|
|
2180 | } |
2183 | } |
2181 | else |
2184 | else |
2182 | font->draw (xpixel, ypixel, text, count, fore, Color_bg); |
2185 | font->draw (xpixel, ypixel, text, count, fore, Color_bg); |
2183 | } |
2186 | } |
2184 | else |
2187 | else |