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.196 by root, Mon Dec 26 23:12:59 2005 UTC vs.
Revision 1.199 by root, Tue Dec 27 01:46:06 2005 UTC

2190 * Determine the attributes for the string 2190 * Determine the attributes for the string
2191 */ 2191 */
2192 int fore = GET_FGCOLOR (rend); // desired foreground 2192 int fore = GET_FGCOLOR (rend); // desired foreground
2193 int back = GET_BGCOLOR (rend); // desired background 2193 int back = GET_BGCOLOR (rend); // desired background
2194 2194
2195 // only do special processing if any attributes are set, which is rare 2195 // only do special processing if any attributes are set, which is unlikely
2196 if (rend & (RS_Bold | RS_Italic | RS_Uline | RS_RVid | RS_Blink | RS_Careful)) 2196 if (rend & (RS_Bold | RS_Italic | RS_Uline | RS_RVid | RS_Blink | RS_Careful))
2197 { 2197 {
2198#if ENABLE_STYLES 2198#if ENABLE_STYLES
2199 // force redraw after "careful" characters to avoid pixel droppings 2199 // force redraw after "careful" characters to avoid pixel droppings
2200 if (srp[col] & RS_Careful && col < ncol - 1 && 0) 2200 if (srp[col] & RS_Careful && col < ncol - 1 && 0)
2448 2448
2449#if ENABLE_FRILLS 2449#if ENABLE_FRILLS
2450 if (selection.rect) 2450 if (selection.rect)
2451 { 2451 {
2452 for (row = max (selection.beg.row, -view_start); row <= min (selection.end.row, view_end); row++) 2452 for (row = max (selection.beg.row, -view_start); row <= min (selection.end.row, view_end); row++)
2453 {
2454 text_t *stp = ROW(row).t;
2455 rend_t *srp = ROW(row).r;
2456
2453 for (rend_t *srp = ROW(row).r, col = selection.beg.col; col < selection.end.col; col++) 2457 for (col = selection.beg.col; col < selection.end.col; col++)
2454 srp[col] ^= RS_RVid; 2458 srp[col] ^= RS_RVid;
2459
2460 while (col-- > selection.beg.col && (stp[col] == NOCHAR || unicode::is_space (stp[col])))
2461 srp[col] ^= RS_RVid | RS_Uline;
2462 }
2455 } 2463 }
2456 else 2464 else
2457#endif 2465#endif
2458 { 2466 {
2459 if (selection.beg.row >= -view_start) 2467 if (selection.beg.row >= -view_start)
2887 end_col = ROW(row).is_longer () ? ncol : ROW(row).l; //TODO//FIXME//LEN 2895 end_col = ROW(row).is_longer () ? ncol : ROW(row).l; //TODO//FIXME//LEN
2888 2896
2889 col = max (col, 0); 2897 col = max (col, 0);
2890 2898
2891 if (row == selection.end.row || selection.rect) 2899 if (row == selection.end.row || selection.rect)
2892 end_col = min (end_col, selection.end.col); 2900 min_it (end_col, selection.end.col);
2893 2901
2894 t = ROW(row).t + col; 2902 t = ROW(row).t + col;
2895 for (; col < end_col; col++) 2903 for (; col < end_col; col++)
2896 { 2904 {
2897 if (*t == NOCHAR) 2905 if (*t == NOCHAR)
2915#endif 2923#endif
2916 else 2924 else
2917 new_selection_text[ofs++] = *t++; 2925 new_selection_text[ofs++] = *t++;
2918 } 2926 }
2919 2927
2928#if ENABLE_FRILLS
2929 if (selection.rect)
2930 {
2931 while (ofs
2932 && new_selection_text[ofs - 1] != C0_LF
2933 && unicode::is_space (new_selection_text[ofs - 1]))
2934 --ofs;
2935
2936 new_selection_text[ofs++] = C0_LF;
2937 }
2938 else
2939#endif
2920 if (!ROW(row).is_longer () && row != selection.end.row) 2940 if (!ROW(row).is_longer () && row != selection.end.row)
2921 new_selection_text[ofs++] = C0_LF; 2941 new_selection_text[ofs++] = C0_LF;
2922 } 2942 }
2923 2943
2924 if (end_col != selection.end.col) 2944 if (end_col != selection.end.col)
2925 new_selection_text[ofs++] = C0_LF; 2945 new_selection_text[ofs++] = C0_LF;
2926 2946
3348 { 3368 {
3349 stp = ROW(end_row).t; 3369 stp = ROW(end_row).t;
3350 3370
3351 while (--end_col >= 0) 3371 while (--end_col >= 0)
3352 { 3372 {
3353 if (stp[end_col] != ' ' 3373 if (stp[end_col] != NOCHAR
3354 && stp[end_col] != '\t' 3374 && !unicode::is_space (stp[end_col]))
3355 && stp[end_col] != NOCHAR)
3356 break; 3375 break;
3357 } 3376 }
3358 3377
3359 if (end_col >= 0 3378 if (end_col >= 0
3360 || !ROW(end_row - 1).is_longer ()) 3379 || !ROW(end_row - 1).is_longer ())
3676 for (int y = ov_h; y--; ) 3695 for (int y = ov_h; y--; )
3677 { 3696 {
3678 text_t *t1 = ov_text[y]; 3697 text_t *t1 = ov_text[y];
3679 rend_t *r1 = ov_rend[y]; 3698 rend_t *r1 = ov_rend[y];
3680 3699
3681 text_t *t2 = ROW(y - view_start).t + ov_x; 3700 text_t *t2 = ROW(y + ov_y - view_start).t + ov_x;
3682 rend_t *r2 = ROW(y - view_start).r + ov_x; 3701 rend_t *r2 = ROW(y + ov_y - view_start).r + ov_x;
3683 3702
3684 for (int x = ov_w; x--; ) 3703 for (int x = ov_w; x--; )
3685 { 3704 {
3686 text_t t = *t1; *t1++ = *t2; *t2++ = t; 3705 text_t t = *t1; *t1++ = *t2; *t2++ = t;
3687 rend_t r = *r1; *r1++ = *r2; *r2++ = SET_FONT (r, FONTSET (r)->find_font (t)); 3706 rend_t r = *r1; *r1++ = *r2; *r2++ = SET_FONT (r, FONTSET (r)->find_font (t));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines