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.337 by root, Thu Apr 1 00:58:38 2010 UTC vs.
Revision 1.340 by sf-exg, Sat Apr 17 23:00:45 2010 UTC

2231 2231
2232 // seek to the beginning of wide characters 2232 // seek to the beginning of wide characters
2233 while (expect_false (stp[col] == NOCHAR && col > 0)) 2233 while (expect_false (stp[col] == NOCHAR && col > 0))
2234 --col; 2234 --col;
2235 2235
2236 rend_t rend = srp[col]; /* screen rendition (target rendtion) */ 2236 rend_t rend = srp[col]; /* screen rendition (target rendition) */
2237 text_t *text = stp + col; 2237 text_t *text = stp + col;
2238 int count = 1; 2238 int count = 1;
2239 2239
2240 dtp[col] = stp[col]; 2240 dtp[col] = stp[col];
2241 drp[col] = rend; 2241 drp[col] = rend;
2286 */ 2286 */
2287 int fore = fgcolor_of (rend); // desired foreground 2287 int fore = fgcolor_of (rend); // desired foreground
2288 int back = bgcolor_of (rend); // desired background 2288 int back = bgcolor_of (rend); // desired background
2289 2289
2290 // only do special processing if any attributes are set, which is unlikely 2290 // only do special processing if any attributes are set, which is unlikely
2291 if (expect_false (rend & (RS_Bold | RS_Italic | RS_Uline | RS_RVid | RS_Blink | RS_Careful))) 2291 if (expect_false (rend & (RS_baseattrMask | RS_Careful | RS_Sel)))
2292 { 2292 {
2293 bool invert = rend & RS_RVid; 2293 bool invert = rend & RS_RVid;
2294 2294
2295#ifndef NO_BOLD_UNDERLINE_REVERSE 2295#ifndef NO_BOLD_UNDERLINE_REVERSE
2296 if (rend & RS_Bold && fore == Color_fg) 2296 if (rend & RS_Bold && fore == Color_fg)
2315 2315
2316 if (rend & RS_Uline && fore == Color_fg && ISSET_PIXCOLOR (Color_UL)) 2316 if (rend & RS_Uline && fore == Color_fg && ISSET_PIXCOLOR (Color_UL))
2317 fore = Color_UL; 2317 fore = Color_UL;
2318#endif 2318#endif
2319 2319
2320#ifdef OPTION_HC
2321 if (rend & RS_Sel)
2322 {
2323 /* invert the column if no highlightColor is set or it is the
2324 * current cursor column */
2325 if (!(showcursor && row == screen.cur.row && text - stp == screen.cur.col)
2326 && ISSET_PIXCOLOR (Color_HC))
2327 {
2328 if (ISSET_PIXCOLOR (Color_HTC))
2329 fore = Color_HTC;
2330 // if invert is 0 reverse video is set so we use bg color as fg color
2331 else if (!invert)
2332 fore = back;
2333 back = Color_HC;
2334 invert = 0;
2335 }
2336 }
2337#endif
2338
2320 if (invert) 2339 if (invert)
2321 { 2340 {
2322#ifdef OPTION_HC
2323 if ((showcursor && row == screen.cur.row && text - stp == screen.cur.col)
2324 || !ISSET_PIXCOLOR (Color_HC))
2325#endif
2326 /* invert the column if no highlightColor is set or it is the
2327 * current cursor column */
2328 ::swap (fore, back); 2341 ::swap (fore, back);
2329#ifdef OPTION_HC
2330 else if (ISSET_PIXCOLOR (Color_HC))
2331 back = Color_HC;
2332#endif
2333 2342
2334#ifndef NO_BOLD_UNDERLINE_REVERSE 2343#ifndef NO_BOLD_UNDERLINE_REVERSE
2335# ifndef OPTION_HC
2336 if (ISSET_PIXCOLOR (Color_RV))
2337 back = Color_RV;
2338# endif
2339 if (fore == back) 2344 if (fore == back)
2340 { 2345 {
2341 fore = Color_bg; 2346 fore = Color_bg;
2342 back = Color_fg; 2347 back = Color_fg;
2343 } 2348 }
2596 { 2601 {
2597#if !ENABLE_MINIMAL 2602#if !ENABLE_MINIMAL
2598 if (selection.rect) 2603 if (selection.rect)
2599 scr_xor_rect (selection.beg.row, selection.beg.col, 2604 scr_xor_rect (selection.beg.row, selection.beg.col,
2600 selection.end.row, selection.end.col, 2605 selection.end.row, selection.end.col,
2601 RS_RVid, RS_RVid | RS_Uline); 2606 RS_Sel | RS_RVid, RS_Sel | RS_RVid | RS_Uline);
2602 else 2607 else
2603#endif 2608#endif
2604 scr_xor_span (selection.beg.row, selection.beg.col, 2609 scr_xor_span (selection.beg.row, selection.beg.col,
2605 selection.end.row, selection.end.col, 2610 selection.end.row, selection.end.col,
2606 RS_RVid); 2611 RS_Sel | RS_RVid);
2607 } 2612 }
2608} 2613}
2609 2614
2610/* ------------------------------------------------------------------------- */ 2615/* ------------------------------------------------------------------------- */
2611/* 2616/*
2904 selection_wait = Sel_normal; 2909 selection_wait = Sel_normal;
2905 2910
2906#if X_HAVE_UTF8_STRING 2911#if X_HAVE_UTF8_STRING
2907 selection_type = Sel_UTF8String; 2912 selection_type = Sel_UTF8String;
2908 if (selection_request_other (xa[XA_UTF8_STRING], selnum)) 2913 if (selection_request_other (xa[XA_UTF8_STRING], selnum))
2909 return; 2914 return;
2910#else 2915#else
2911 selection_type = Sel_CompoundText; 2916 selection_type = Sel_CompoundText;
2912 if (selection_request_other (xa[XA_COMPOUND_TEXT], selnum)) 2917 if (selection_request_other (xa[XA_COMPOUND_TEXT], selnum))
2913 return; 2918 return;
2914#endif 2919#endif
2915 } 2920 }
2916 2921
2917 selection_wait = Sel_none; /* don't loop in selection_paste () */ 2922 selection_wait = Sel_none; /* don't loop in selection_paste () */
2918 selection_paste (display->root, XA_CUT_BUFFER0, false); 2923 selection_paste (display->root, XA_CUT_BUFFER0, false);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines