… | |
… | |
2400 | else |
2400 | else |
2401 | font->draw (*TermWin.drawable, xpixel, ypixel, text, count, fore, back); |
2401 | font->draw (*TermWin.drawable, xpixel, ypixel, text, count, fore, back); |
2402 | |
2402 | |
2403 | if (rend & RS_Uline && font->descent > 1 && fore != back) |
2403 | if (rend & RS_Uline && font->descent > 1 && fore != back) |
2404 | { |
2404 | { |
|
|
2405 | #if ENABLE_FRILLS |
|
|
2406 | if (ISSET_PIXCOLOR (Color_underline)) |
|
|
2407 | XSetForeground (display->display, TermWin.gc, pix_colors[Color_underline]); |
|
|
2408 | else |
|
|
2409 | #endif |
2405 | XSetForeground (display->display, TermWin.gc, pix_colors[fore]); |
2410 | XSetForeground (display->display, TermWin.gc, pix_colors[fore]); |
|
|
2411 | |
2406 | XDrawLine (display->display, drawBuffer, TermWin.gc, |
2412 | XDrawLine (display->display, drawBuffer, TermWin.gc, |
2407 | xpixel, ypixel + font->ascent + 1, |
2413 | xpixel, ypixel + font->ascent + 1, |
2408 | xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1); |
2414 | xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1); |
2409 | } |
2415 | } |
2410 | } /* for (col....) */ |
2416 | } /* for (col....) */ |
… | |
… | |
2656 | /* ------------------------------------------------------------------------- */ |
2662 | /* ------------------------------------------------------------------------- */ |
2657 | /* |
2663 | /* |
2658 | * Paste a selection direct to the command fd |
2664 | * Paste a selection direct to the command fd |
2659 | */ |
2665 | */ |
2660 | void |
2666 | void |
2661 | rxvt_term::paste (const unsigned char *data, unsigned int len) |
2667 | rxvt_term::paste (unsigned char *data, unsigned int len) |
2662 | { |
2668 | { |
2663 | unsigned int i, j, n; |
|
|
2664 | unsigned char *ds = (unsigned char *)rxvt_malloc (PASTE_SIZE); |
|
|
2665 | |
|
|
2666 | /* convert normal newline chars into common keyboard Return key sequence */ |
2669 | /* convert normal newline chars into common keyboard Return key sequence */ |
2667 | for (i = 0; i < len; i += PASTE_SIZE) |
2670 | for (unsigned int i = 0; i < len; i++) |
2668 | { |
|
|
2669 | n = min (len - i, PASTE_SIZE); |
|
|
2670 | memcpy (ds, data + i, n); |
|
|
2671 | |
|
|
2672 | for (j = 0; j < n; j++) |
|
|
2673 | if (ds[j] == C0_LF) |
2671 | if (data[i] == C0_LF) |
2674 | ds[j] = C0_CR; |
2672 | data[i] = C0_CR; |
2675 | |
2673 | |
2676 | tt_write (ds, (int)n); |
2674 | tt_write (data, len); |
2677 | } |
|
|
2678 | |
|
|
2679 | free (ds); |
|
|
2680 | } |
2675 | } |
2681 | |
2676 | |
2682 | /* ------------------------------------------------------------------------- */ |
2677 | /* ------------------------------------------------------------------------- */ |
2683 | /* |
2678 | /* |
2684 | * Respond to a notification that a primary selection has been sent |
2679 | * Respond to a notification that a primary selection has been sent |