… | |
… | |
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 | /* |