--- rxvt-unicode/src/screen.C 2006/01/09 23:00:07 1.219 +++ rxvt-unicode/src/screen.C 2006/01/12 09:55:44 1.226 @@ -574,7 +574,7 @@ void rxvt_term::scr_color (unsigned int color, int fgbg) { - if (color > maxTermCOLOR) + if (!IN_RANGE_INC (color, minCOLOR, maxTermCOLOR)) color = fgbg; if (fgbg == Color_fg) @@ -2383,9 +2383,6 @@ */ scr_reverse_selection (); - if (refresh_type & SMOOTH_REFRESH) - XFlush (display->display); - num_scr = 0; num_scr_allow = 1; } @@ -2500,11 +2497,11 @@ for (; row < min (end_row, view_end); row++, col = 0) for (rend_t *srp = ROW(row).r; col < ncol; col++) - srp[col] ^= RS_RVid; + srp[col] ^= rstyle; if (row == end_row) for (rend_t *srp = ROW(row).r; col < end_col; col++) - srp[col] ^= RS_RVid; + srp[col] ^= rstyle; } /* ------------------------------------------------------------------------- */ @@ -3026,7 +3023,10 @@ return true; } else - return false; + { + selection_clear (); + return false; + } #if 0 XTextProperty ct; @@ -3050,6 +3050,15 @@ clicks = ((clicks - 1) % 3) + 1; selection.clicks = clicks; /* save clicks so extend will work */ + if (clicks == 2 && !selection.rect + && HOOK_INVOKE ((this, HOOK_SEL_EXTEND, DT_END))) + { + MEvent.clicks = 1; // what a mess + selection.screen = current_screen; + selection.op = SELECTION_CONT; + return; + } + selection_start_colrow (Pixel2Col (x), Pixel2Row (y)); if (clicks == 2 || clicks == 3) @@ -3354,11 +3363,8 @@ if (ROWCOL_IS_AFTER (selection.end, selection.beg)) selection.end.col--; - if (!HOOK_INVOKE ((this, HOOK_SEL_EXTEND, DT_END))) - { - selection_delimit_word (UP, &selection.beg, &selection.beg); - selection_delimit_word (DN, &selection.end, &selection.end); - } + selection_delimit_word (UP, &selection.beg, &selection.beg); + selection_delimit_word (DN, &selection.end, &selection.end); } else if (selection.clicks == 3) {