… | |
… | |
118 | /* Fill part/all of a line with blanks. */ |
118 | /* Fill part/all of a line with blanks. */ |
119 | void |
119 | void |
120 | rxvt_term::scr_blank_line (text_t *et, rend_t *er, unsigned int width, rend_t efs) |
120 | rxvt_term::scr_blank_line (text_t *et, rend_t *er, unsigned int width, rend_t efs) |
121 | { |
121 | { |
122 | efs &= ~RS_baseattrMask; |
122 | efs &= ~RS_baseattrMask; |
123 | efs = SET_FONT (efs, TermWin.fontset->find_font (' ')); |
123 | efs = SET_FONT (efs, TermWin.ascii_map [' ' - 0x20]); |
124 | |
124 | |
125 | while (width--) |
125 | while (width--) |
126 | { |
126 | { |
127 | *et++ = ' '; |
127 | *et++ = ' '; |
128 | *er++ = efs; |
128 | *er++ = efs; |
… | |
… | |
794 | } |
794 | } |
795 | } |
795 | } |
796 | #ifdef DEBUG_STRICT |
796 | #ifdef DEBUG_STRICT |
797 | assert (screen.cur.col < last_col); |
797 | assert (screen.cur.col < last_col); |
798 | assert ((screen.cur.row < TermWin.nrow) |
798 | assert ((screen.cur.row < TermWin.nrow) |
799 | && (screen.cur.row >= - (int32_t)TermWin.nscrolled)); |
799 | && (screen.cur.row >= - (int32_t)TermWin.nscrolled)); |
800 | #else /* drive with your eyes closed */ |
800 | #else /* drive with your eyes closed */ |
801 | MIN_IT (screen.cur.col, last_col - 1); |
801 | MIN_IT (screen.cur.col, last_col - 1); |
802 | MIN_IT (screen.cur.row, (int32_t)TermWin.nrow - 1); |
802 | MIN_IT (screen.cur.row, (int32_t)TermWin.nrow - 1); |
803 | MAX_IT (screen.cur.row, - (int32_t)TermWin.nscrolled); |
803 | MAX_IT (screen.cur.row, - (int32_t)TermWin.nscrolled); |
804 | #endif |
804 | #endif |
… | |
… | |
898 | // trim characters we can't store directly :( |
898 | // trim characters we can't store directly :( |
899 | if (c >= 0x10000) |
899 | if (c >= 0x10000) |
900 | c = rxvt_composite.compose (c); // map to lower 16 bits |
900 | c = rxvt_composite.compose (c); // map to lower 16 bits |
901 | #endif |
901 | #endif |
902 | bool bold = (Options & Opt_realBold) && ((rstyle & RS_Bold) != 0); |
902 | bool bold = (Options & Opt_realBold) && ((rstyle & RS_Bold) != 0); |
903 | rend_t rend = SET_FONT (rstyle, TermWin.fontset->find_font (c, bold)); |
903 | rend_t rend = SET_FONT (rstyle, |
|
|
904 | c > 0x7f || bold || c < 0x20 |
|
|
905 | ? TermWin.fontset->find_font (c, bold) |
|
|
906 | : TermWin.ascii_map [c - 0x20]); |
904 | |
907 | |
905 | do |
908 | do |
906 | { |
909 | { |
907 | stp[screen.cur.col] = c; |
910 | stp[screen.cur.col] = c; |
908 | srp[screen.cur.col] = rend; |
911 | srp[screen.cur.col] = rend; |
… | |
… | |
1747 | row_col_t rc[RC_COUNT]; |
1750 | row_col_t rc[RC_COUNT]; |
1748 | |
1751 | |
1749 | if (drawn_text == NULL) /* sanity check */ |
1752 | if (drawn_text == NULL) /* sanity check */ |
1750 | return; |
1753 | return; |
1751 | |
1754 | |
|
|
1755 | #ifndef NO_SLOW_LINK_SUPPORT |
|
|
1756 | if (refresh_type == FAST_REFRESH && !display->is_local) |
|
|
1757 | { |
|
|
1758 | y = 0; |
|
|
1759 | height = TermWin.height; |
|
|
1760 | } |
|
|
1761 | #endif |
|
|
1762 | |
1752 | #ifdef DEBUG_STRICT |
1763 | #ifdef DEBUG_STRICT |
1753 | x = max (x, 0); |
1764 | x = max (x, 0); |
1754 | x = min (x, (int)TermWin.width); |
1765 | x = min (x, (int)TermWin.width); |
1755 | y = max (y, 0); |
1766 | y = max (y, 0); |
1756 | y = min (y, (int)TermWin.height); |
1767 | y = min (y, (int)TermWin.height); |
… | |
… | |
2055 | /* |
2066 | /* |
2056 | * D: CopyArea pass - very useful for slower links |
2067 | * D: CopyArea pass - very useful for slower links |
2057 | * This has been deliberately kept simple. |
2068 | * This has been deliberately kept simple. |
2058 | */ |
2069 | */ |
2059 | i = num_scr; |
2070 | i = num_scr; |
|
|
2071 | if (!display->is_local |
2060 | if (refresh_type == FAST_REFRESH && num_scr_allow && i |
2072 | && refresh_type == FAST_REFRESH && num_scr_allow && i |
2061 | && abs (i) < TermWin.nrow && !must_clear) |
2073 | && abs (i) < TermWin.nrow && !must_clear) |
2062 | { |
2074 | { |
2063 | int16_t nits; |
2075 | int16_t nits; |
2064 | int j; |
2076 | int j; |
2065 | rend_t *drp2; |
2077 | rend_t *drp2; |
… | |
… | |
2235 | back = Color_RV; |
2247 | back = Color_RV; |
2236 | #endif |
2248 | #endif |
2237 | } |
2249 | } |
2238 | |
2250 | |
2239 | #ifdef TEXT_BLINK |
2251 | #ifdef TEXT_BLINK |
2240 | if (rend & RS_Blink && back == Color_bg) |
2252 | if (rend & RS_Blink && (back == Color_bg || fore == Color_bg)) |
2241 | { |
2253 | { |
2242 | if (!text_blink_ev.active) |
2254 | if (!text_blink_ev.active) |
2243 | { |
2255 | { |
2244 | text_blink_ev.start (NOW + TEXT_BLINK_INTERVAL); |
2256 | text_blink_ev.start (NOW + TEXT_BLINK_INTERVAL); |
2245 | hidden_text = 0; |
2257 | hidden_text = 0; |
… | |
… | |
2275 | font->draw (*TermWin.drawable, xpixel, ypixel, text, count, fore, Color_bg); |
2287 | font->draw (*TermWin.drawable, xpixel, ypixel, text, count, fore, Color_bg); |
2276 | } |
2288 | } |
2277 | else |
2289 | else |
2278 | font->draw (*TermWin.drawable, xpixel, ypixel, text, count, fore, back); |
2290 | font->draw (*TermWin.drawable, xpixel, ypixel, text, count, fore, back); |
2279 | |
2291 | |
2280 | if ((rend & RS_Uline) && (font->descent > 1)) |
2292 | if (rend & RS_Uline && font->descent > 1 && fore != back) |
2281 | XDrawLine (display->display, drawBuffer, TermWin.gc, |
2293 | XDrawLine (display->display, drawBuffer, TermWin.gc, |
2282 | xpixel, ypixel + font->ascent + 1, |
2294 | xpixel, ypixel + font->ascent + 1, |
2283 | xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1); |
2295 | xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1); |
2284 | } /* for (col....) */ |
2296 | } /* for (col....) */ |
2285 | } /* for (row....) */ |
2297 | } /* for (row....) */ |
… | |
… | |
2345 | (unsigned int)TermWin.int_bwidth, |
2357 | (unsigned int)TermWin.int_bwidth, |
2346 | (unsigned int)TermWin_TotalHeight (), False); |
2358 | (unsigned int)TermWin_TotalHeight (), False); |
2347 | #endif |
2359 | #endif |
2348 | |
2360 | |
2349 | if (refresh_type & SMOOTH_REFRESH) |
2361 | if (refresh_type & SMOOTH_REFRESH) |
2350 | XSync (display->display, False); |
2362 | XFlush (display->display); |
2351 | |
2363 | |
2352 | num_scr = 0; |
2364 | num_scr = 0; |
2353 | num_scr_allow = 1; |
2365 | num_scr_allow = 1; |
2354 | want_refresh = 0; /* screen is current */ |
2366 | want_refresh = 0; /* screen is current */ |
2355 | } |
2367 | } |